1 | <?php |
||
21 | class ClassMetadataFactory implements ClassMetadataFactoryInterface |
||
22 | { |
||
23 | /** |
||
24 | * @var DriverInterface |
||
25 | */ |
||
26 | protected $driver; |
||
27 | |||
28 | /** |
||
29 | * @var CacheInterface |
||
30 | */ |
||
31 | protected $cache; |
||
32 | |||
33 | /** |
||
34 | * @var array |
||
35 | */ |
||
36 | protected $loadedMetadata = array(); |
||
37 | |||
38 | /** |
||
39 | * ClassMetadataFactory constructor. |
||
40 | * |
||
41 | * @param DriverInterface $driver |
||
42 | * @param CacheInterface|null $cache |
||
43 | */ |
||
44 | public function __construct(DriverInterface $driver, CacheInterface $cache = null) |
||
49 | |||
50 | /** |
||
51 | * {@inheritdoc} |
||
52 | */ |
||
53 | public function getAllMetadata() |
||
64 | |||
65 | /** |
||
66 | * {@inheritdoc} |
||
67 | */ |
||
68 | public function getMetadataFor($className) |
||
92 | |||
93 | /** |
||
94 | * {@inheritdoc} |
||
95 | */ |
||
96 | public function hasMetadataFor($className) |
||
100 | |||
101 | /** |
||
102 | * {@inheritdoc} |
||
103 | */ |
||
104 | public function setMetadataFor($className, ClassMetadataInterface $metadata) |
||
108 | |||
109 | /** |
||
110 | * Loads the metadata of the class in question and all it's ancestors whose metadata |
||
111 | * is still not loaded. |
||
112 | * |
||
113 | * @param string $className |
||
114 | * |
||
115 | * @return array |
||
116 | */ |
||
117 | protected function loadMetadata($className) |
||
129 | |||
130 | /** |
||
131 | * @param string $className |
||
132 | * |
||
133 | * @return array |
||
134 | */ |
||
135 | private function getClassHierarchy($className) |
||
147 | } |
||
148 |