-
-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from sim8568X/dev
change psr-4 depen, codeformat, restructed and formatting
- Loading branch information
Showing
19 changed files
with
66 additions
and
105 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,10 @@ | ||
<?php | ||
|
||
|
||
namespace Xenon\Config; | ||
namespace Xenon\Multisms\Config; | ||
|
||
|
||
class Configuration | ||
{ | ||
|
||
//todo:: write something here | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
<?php | ||
|
||
|
||
namespace Xenon\Handler; | ||
namespace Xenon\Multisms\Handler; | ||
|
||
|
||
class Formatter | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,56 +1,29 @@ | ||
<?php | ||
|
||
|
||
namespace Xenon\Handler; | ||
namespace Xenon\Multisms\Handler; | ||
|
||
|
||
class XenonException extends \Exception | ||
{ | ||
protected $message; | ||
protected $code; | ||
|
||
public function __construct($message, $code = null) | ||
{ | ||
parent::__construct($message, $code); | ||
} | ||
|
||
/** | ||
* @return array | ||
* Report the exception. | ||
* | ||
* @return void | ||
*/ | ||
public function showException($object = null): array | ||
public function report() | ||
{ | ||
$bt = debug_backtrace(); | ||
$exception = [ | ||
'exception' => $this->getMessage(), | ||
'used_file' => [ | ||
'file' => $bt[0]['file'] . ' at line: ' . $bt[0]['line'], | ||
'class' => $bt[1]['class'], | ||
'method' => $bt[1]['function'] . '()', | ||
'called by' => $this->getCaller() | ||
] | ||
]; | ||
echo '<pre>'; | ||
print_r($exception); | ||
echo '<pre>'; | ||
exit; | ||
} | ||
|
||
/** | ||
* Gets the caller of the function where this function is called from | ||
* @param string what to return? (Leave empty to get all, or specify: "class", "function", "line", "class", etc.) - | ||
* options see: http://php.net/manual/en/function.debug-backtrace.php | ||
* @return mixed | ||
* Render the exception into an HTTP response. | ||
* | ||
* @param Request $request | ||
* @return Response | ||
*/ | ||
private function getCaller($what = NULL) | ||
public function render(Request $request) | ||
{ | ||
$trace = debug_backtrace(); | ||
$previousCall = $trace[2]; // 0 is this call, 1 is call in previous function, 2 is caller of that function | ||
|
||
if (isset($what)) { | ||
return $previousCall[$what]; | ||
} else { | ||
return $previousCall; | ||
} | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
<?php | ||
|
||
|
||
namespace Xenon\Provider; | ||
namespace Xenon\Multisms\Provider; | ||
|
||
|
||
class Alpha implements ProviderRoadmap | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
<?php | ||
|
||
|
||
namespace Xenon\Provider; | ||
namespace Xenon\Multisms\Provider; | ||
|
||
|
||
class DnsBd extends AbstractProvider | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
<?php | ||
|
||
|
||
namespace Xenon\Provider; | ||
namespace Xenon\Multisms\Provider; | ||
|
||
|
||
interface ProviderRoadmap | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters