1 | <?php |
||
8 | class DebugHelper |
||
9 | { |
||
10 | const INFO_DEPRECATION_LOG_EVENT = 'INFO_DEPRECATION_LOG'; |
||
11 | |||
12 | /** |
||
13 | * Log accesses to deprecated fucntions to the debug log |
||
14 | * |
||
15 | * @param string $alternative (optional) The function or method that should be used instead |
||
16 | * @param int $callerOffset (optional) How far the deprecated method is removed from this one |
||
17 | * |
||
18 | * @triggers \dokuwiki\Debug::INFO_DEPRECATION_LOG_EVENT |
||
19 | */ |
||
20 | public static function dbgDeprecatedFunction($alternative = '', $callerOffset = 1) |
||
45 | |||
46 | /** |
||
47 | * This marks logs a deprecation warning for a property that should no longer be used |
||
48 | * |
||
49 | * This is usually called withing a magic getter or setter. |
||
50 | * For logging deprecated functions or methods see dbgDeprecatedFunction() |
||
51 | * |
||
52 | * @param string $class The class with the deprecated property |
||
53 | * @param string $propertyName The name of the deprecated property |
||
54 | * |
||
55 | * @triggers \dokuwiki\Debug::INFO_DEPRECATION_LOG_EVENT |
||
56 | */ |
||
57 | public static function dbgDeprecatedProperty($class, $propertyName) |
||
80 | |||
81 | /** |
||
82 | * @param array $backtrace |
||
83 | * @param string $alternative |
||
84 | * @param string $deprecatedThing |
||
85 | * @param string $caller |
||
86 | * @param string $file |
||
87 | * @param int $line |
||
88 | */ |
||
89 | private static function triggerDeprecationEvent( |
||
116 | } |
||
117 |