| Conditions | 2 |
| Paths | 2 |
| Total Lines | 16 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 40 | protected function rewindStackWhile(callable $scope_checker, $stack_max_depth=20) |
||
| 41 | { |
||
| 42 | $backtrace = debug_backtrace( DEBUG_BACKTRACE_IGNORE_ARGS, $stack_max_depth); |
||
| 43 | $i = 1; |
||
| 44 | $caller = $backtrace[$i]; |
||
| 45 | while ( $scope_checker( $backtrace, $i ) ) { |
||
| 46 | $i++; |
||
| 47 | $caller = $backtrace[$i]; |
||
| 48 | // TODO remove the prevuce levels of the stack? |
||
| 49 | } |
||
| 50 | |||
| 51 | // var_export($backtrace); |
||
| 52 | // var_export($caller); |
||
| 53 | |||
| 54 | $this->file = $caller['file']; |
||
| 55 | $this->line = $caller['line']; |
||
| 56 | |||
| 62 |