| 1 | <?php |
||
| 7 | class Backtrace extends \ArrayIterator |
||
| 8 | { |
||
| 9 | /** @var string[] skipped classes during search for caller module */ |
||
| 10 | private static $skip = array( |
||
| 11 | 'Saltwater\Navigator', |
||
| 12 | 'Saltwater\Server' |
||
| 13 | ); |
||
| 14 | |||
| 15 | public function __construct() |
||
| 24 | |||
| 25 | /** |
||
| 26 | * Shorthand for generating a Backtrace and returning the last caller |
||
| 27 | * |
||
| 28 | * @return array|null |
||
| 29 | */ |
||
| 30 | public static function lastCaller() |
||
| 36 | |||
| 37 | /** |
||
| 38 | * Find and extract the last non-saltwater core class calling |
||
| 39 | * |
||
| 40 | * @return array|null |
||
| 41 | */ |
||
| 42 | public function extractCaller() |
||
| 57 | |||
| 58 | /** |
||
| 59 | * Check whether a caller class can be skipped |
||
| 60 | * |
||
| 61 | * @param string $class |
||
| 62 | * |
||
| 63 | * @return bool |
||
| 64 | */ |
||
| 65 | private function skipCaller($class) |
||
| 71 | } |
||
| 72 |