1 | <?php |
||
15 | class Reflection |
||
16 | { |
||
17 | protected static $classInfo = []; |
||
18 | |||
19 | /* |
||
20 | * returns implemeted interfaces and (parents) class names as array. |
||
21 | * When second parameter ($store) ist set to FALSE, the class-info will |
||
22 | * not be cached. This serves some memory (e.g. 500b per requested class), |
||
23 | * but wil make subsequent calls slower (about 4-5 times). So when you use |
||
24 | * this method only once per process, set $store to FALSE - otherwise set |
||
25 | * $store to TRUE. Since PEIP is created for performance on heavy usage |
||
26 | * the default for store is TRUE. |
||
27 | * |
||
28 | * @param string name/instance of the class to return info for |
||
29 | * @param boolean wether to store the info for the class internally |
||
30 | * @return array array with interface/class info for the class |
||
31 | */ |
||
32 | |||
33 | public static function getImplementedClassesAndInterfaces($class, $store = true) |
||
52 | } |
||
53 |