1 | <?php |
||
38 | class MappingCollector implements CollectorInterface, AutoHideInterface, Serializable |
||
39 | { |
||
40 | /** |
||
41 | * Collector priority |
||
42 | */ |
||
43 | const PRIORITY = 10; |
||
44 | |||
45 | /** |
||
46 | * @var string |
||
47 | */ |
||
48 | protected $name; |
||
49 | |||
50 | /** |
||
51 | * @var ClassMetadataFactory|null |
||
52 | */ |
||
53 | protected $classMetadataFactory = array(); |
||
54 | |||
55 | /** |
||
56 | * @var \Doctrine\Common\Persistence\Mapping\ClassMetadata[] indexed by class name |
||
57 | */ |
||
58 | protected $classes = array(); |
||
59 | |||
60 | /** |
||
61 | * @param ClassMetadataFactory $classMetadataFactory |
||
62 | * @param string $name |
||
63 | */ |
||
64 | public function __construct(ClassMetadataFactory $classMetadataFactory, $name) |
||
65 | { |
||
66 | $this->classMetadataFactory = $classMetadataFactory; |
||
67 | $this->name = (string) $name; |
||
68 | } |
||
69 | |||
70 | /** |
||
71 | * {@inheritDoc} |
||
72 | */ |
||
73 | 1 | public function getName() |
|
74 | { |
||
75 | 1 | return $this->name; |
|
76 | } |
||
77 | |||
78 | /** |
||
79 | * {@inheritDoc} |
||
80 | */ |
||
81 | 1 | public function getPriority() |
|
82 | { |
||
83 | 1 | return static::PRIORITY; |
|
84 | } |
||
85 | |||
86 | /** |
||
87 | * {@inheritDoc} |
||
88 | */ |
||
89 | 2 | public function collect(MvcEvent $mvcEvent) |
|
104 | |||
105 | /** |
||
106 | * {@inheritDoc} |
||
107 | */ |
||
108 | 1 | public function canHide() |
|
112 | |||
113 | /** |
||
114 | * {@inheritDoc} |
||
115 | */ |
||
116 | 1 | public function serialize() |
|
125 | |||
126 | /** |
||
127 | * {@inheritDoc} |
||
128 | */ |
||
129 | 1 | public function unserialize($serialized) |
|
135 | |||
136 | /** |
||
137 | * @return \Doctrine\Common\Persistence\Mapping\ClassMetadata[] |
||
138 | */ |
||
139 | 1 | public function getClasses() |
|
143 | } |
||
144 |