1 | <?php |
||
23 | class ReflectionCompositeProvider |
||
24 | implements ReflectionCompositeProviderInterface |
||
|
|||
25 | { |
||
26 | /** |
||
27 | * @var ReflectionCompositeProviderInterface |
||
28 | */ |
||
29 | protected static $default; |
||
30 | |||
31 | /** |
||
32 | * Returns the default ReflectionCompositeProviderInteface used by |
||
33 | * the application |
||
34 | * |
||
35 | * If one has not been set, a new ReflectionCompositeProvider is |
||
36 | * instanciated on the fly |
||
37 | * |
||
38 | * @return ReflectionCompositeProviderInterface |
||
39 | */ |
||
40 | 26 | public static function getDefault() |
|
50 | |||
51 | /** |
||
52 | * Sets the default ReflectionCompositeProviderInterface used by |
||
53 | * the applciation |
||
54 | * |
||
55 | * @param ReflectionCompositeProviderInterface $default |
||
56 | */ |
||
57 | 1 | public static function setDefault |
|
64 | |||
65 | /** |
||
66 | * Cache used by this provider |
||
67 | * |
||
68 | * @var HashMap |
||
69 | */ |
||
70 | private $cache; |
||
71 | |||
72 | /** |
||
73 | * Builds the provider by instanciating its cache |
||
74 | */ |
||
75 | 2 | public function __construct() |
|
79 | |||
80 | /** |
||
81 | * Gets a ReflectionComposite, either by using a cached version of |
||
82 | * it or building it on the fly |
||
83 | * |
||
84 | * @param string $classname |
||
85 | * @return ReflectionComposite |
||
86 | */ |
||
87 | 3 | public function get(string $classname) : ReflectionComposite |
|
103 | } |
||
104 |