1 | <?php |
||
18 | class DoctrineSubscriber implements EventSubscriber |
||
19 | { |
||
20 | /** |
||
21 | * @var Bus |
||
22 | */ |
||
23 | private $bus; |
||
24 | |||
25 | /** |
||
26 | * @var array |
||
27 | */ |
||
28 | private $events = []; |
||
29 | |||
30 | /** |
||
31 | * @param Bus $bus |
||
32 | * @param RegistryInterface $doctrine |
||
33 | * @param array $events |
||
34 | * @param array $connections |
||
35 | */ |
||
36 | public function __construct(Bus $bus, RegistryInterface $doctrine, array $events, array $connections) |
||
53 | |||
54 | /** |
||
55 | * @return array |
||
56 | */ |
||
57 | public function getSubscribedEvents() |
||
61 | |||
62 | /** |
||
63 | * @param LifecycleEventArgs $args |
||
64 | */ |
||
65 | public function prePersist(LifecycleEventArgs $args) |
||
69 | |||
70 | /** |
||
71 | * @param LifecycleEventArgs $args |
||
72 | */ |
||
73 | public function preUpdate(LifecycleEventArgs $args) |
||
77 | |||
78 | /** |
||
79 | * @param LifecycleEventArgs $args |
||
80 | */ |
||
81 | public function preRemove(LifecycleEventArgs $args) |
||
85 | |||
86 | /** |
||
87 | * @param LifecycleEventArgs $args |
||
88 | */ |
||
89 | public function preFlush(LifecycleEventArgs $args) |
||
93 | |||
94 | /** |
||
95 | * @param LifecycleEventArgs $args |
||
96 | */ |
||
97 | protected function pullAndPublish(LifecycleEventArgs $args) |
||
104 | } |
||
105 |