Conditions | 2 |
Paths | 2 |
Total Lines | 16 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
30 | protected function rewindStackWhile(callable $scope_checker, $stack_max_depth=20) |
||
31 | { |
||
32 | $backtrace = debug_backtrace( DEBUG_BACKTRACE_IGNORE_ARGS, $stack_max_depth); |
||
33 | $i = 1; |
||
34 | $caller = $backtrace[$i]; |
||
35 | while ( $scope_checker( $backtrace, $i ) ) { |
||
36 | $i++; |
||
37 | $caller = $backtrace[$i]; |
||
38 | // TODO remove the prevuce levels of the stack? |
||
39 | } |
||
40 | |||
41 | // var_export($backtrace); |
||
42 | // var_export($caller); |
||
43 | |||
44 | $this->file = $caller['file']; |
||
45 | $this->line = $caller['line']; |
||
46 | |||
52 |