1 | <?php |
||
21 | class EntityEventResolver implements ContainerAwareInterface, EventResolverInterface |
||
22 | { |
||
23 | use ContainerAwareTrait; |
||
24 | |||
25 | protected $eventShortName; |
||
26 | |||
27 | /** @var $event DoctrineEntityEvent */ |
||
28 | protected $event; |
||
29 | |||
30 | protected $entity; |
||
31 | |||
32 | protected $eventName; |
||
33 | |||
34 | protected $identity = ['', '']; |
||
35 | |||
36 | |||
37 | /** |
||
38 | * @param Event|DoctrineEntityEvent $event |
||
39 | * @param $eventName |
||
40 | * |
||
41 | * @return array |
||
42 | */ |
||
43 | public function getEventLogInfo(Event $event, $eventName) |
||
63 | |||
64 | protected function getSingleIdentity() |
||
73 | |||
74 | /** |
||
75 | * @param DoctrineEntityEvent $event |
||
76 | * @param string $eventName |
||
77 | */ |
||
78 | private function initialize(DoctrineEntityEvent $event, $eventName) |
||
87 | |||
88 | private function getIdField() |
||
92 | |||
93 | private function getIdValue() |
||
97 | |||
98 | protected function getChangeSets($entity) |
||
102 | |||
103 | protected function isUpdateEvent() |
||
107 | |||
108 | |||
109 | /** |
||
110 | * @param string $typeName |
||
111 | * @return string |
||
112 | */ |
||
113 | protected function getEventType($typeName) |
||
117 | |||
118 | /** |
||
119 | * @param string $shortName |
||
120 | * @return string |
||
121 | */ |
||
122 | protected function getDescription($shortName) |
||
132 | |||
133 | /** |
||
134 | * @return string |
||
135 | */ |
||
136 | protected function getEventShortName() |
||
144 | |||
145 | /** |
||
146 | * @return string |
||
147 | */ |
||
148 | protected function getName() |
||
152 | |||
153 | /** |
||
154 | * @param $object |
||
155 | * @return \ReflectionClass |
||
156 | */ |
||
157 | protected function getReflectionClassFromObject($object) |
||
161 | |||
162 | /** |
||
163 | * @return \Doctrine\ORM\UnitOfWork |
||
164 | */ |
||
165 | protected function getUnitOfWork() |
||
169 | } |
||
170 |
In PHP it is possible to write to properties without declaring them. For example, the following is perfectly valid PHP code:
Generally, it is a good practice to explictly declare properties to avoid accidental typos and provide IDE auto-completion: