Conditions | 3 |
Paths | 3 |
Total Lines | 14 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
25 | protected function logDeprecationUnlessCalledBy($expectedCaller) |
||
26 | { |
||
27 | if (PhpXmlRpc::$xmlrpc_silence_deprecations) { |
||
28 | return; |
||
29 | } |
||
30 | |||
31 | $trace = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS, 3); |
||
32 | /// @todo we should check as well $trace[2]['class'], and make sure that it is a descendent of the class passed in in $expectedCaller |
||
33 | if ($trace[2]['function'] === $expectedCaller) { |
||
34 | return; |
||
35 | } |
||
36 | |||
37 | $this->getLogger()->warning('XML-RPC Deprecated: ' . $trace[1]['class'] . '::' . $trace[1]['function'] . |
||
38 | ' is only supposed to be called by ' . $expectedCaller); |
||
39 | } |
||
41 |