1 | <?php |
||
10 | class EventDispatchingAgent implements AgentInterface |
||
11 | { |
||
12 | private $dispatcher; |
||
13 | private $agent; |
||
14 | |||
15 | public function __construct( |
||
23 | |||
24 | /** |
||
25 | * {@inheritdoc} |
||
26 | */ |
||
27 | public function find($identifier, string $class = null) |
||
31 | |||
32 | /** |
||
33 | * {@inheritdoc} |
||
34 | */ |
||
35 | public function save($object) |
||
41 | |||
42 | /** |
||
43 | * {@inheritdoc} |
||
44 | */ |
||
45 | public function query(Query $query): \Traversable |
||
49 | |||
50 | /** |
||
51 | * {@inheritdoc} |
||
52 | */ |
||
53 | public function delete($object) |
||
59 | |||
60 | /** |
||
61 | * {@inheritdoc} |
||
62 | */ |
||
63 | public function getIdentifier($object) |
||
67 | |||
68 | /** |
||
69 | * {@inheritdoc} |
||
70 | */ |
||
71 | public function supports(string $class): bool |
||
75 | |||
76 | /** |
||
77 | * {@inheritdoc} |
||
78 | */ |
||
79 | public function setParent($object, $parent) |
||
83 | |||
84 | private function dispatch(string $eventName, $object) |
||
88 | } |
||
89 |