1 | <?php |
||
23 | trait HasReflectorTrait |
||
24 | { |
||
25 | /** |
||
26 | * The reflection information for this composite |
||
27 | * |
||
28 | * @var ReflectionComposite |
||
29 | */ |
||
30 | protected static $reflectionComposite; |
||
31 | |||
32 | /** |
||
33 | * Returns the ReflectionComposite for this object, or constructs |
||
34 | * one on the fly if one does not yet exist, using a |
||
35 | * ReflectionCompositeFactory |
||
36 | * |
||
37 | * @return ReflectionComposite |
||
38 | */ |
||
39 | 14 | protected static function getReflectionComposite() |
|
40 | { |
||
41 | 14 | if (!static::$reflectionComposite) |
|
42 | { |
||
43 | static::$reflectionComposite = |
||
44 | 4 | ReflectionCompositeFactory::fromClassName |
|
45 | ( |
||
46 | 4 | get_called_class() |
|
47 | ) |
||
48 | 4 | ->build(); |
|
49 | } |
||
50 | |||
51 | 14 | return static::$reflectionComposite; |
|
52 | } |
||
53 | |||
54 | /** |
||
55 | * Set the default ReflectionComposite for this class |
||
56 | */ |
||
57 | protected static function setDefaultReflectionComposite |
||
64 | } |
||
65 |