1 | <?php |
||
33 | class JmsSerializeEventsManager |
||
34 | { |
||
35 | /** |
||
36 | * @var EventDispatcher $dispatcher Dispatcher |
||
37 | */ |
||
38 | private $dispatcher; |
||
39 | |||
40 | /** |
||
41 | * @var CachedReader $annotationReader Cached annotation reader |
||
42 | */ |
||
43 | private $annotationReader; |
||
44 | |||
45 | /** |
||
46 | * JmsSerializeEventsManager constructor. |
||
47 | */ |
||
48 | public function __construct() |
||
52 | |||
53 | /** |
||
54 | * Add post & pre serialize event listeners |
||
55 | * |
||
56 | * @param RequestContext $requestContext |
||
57 | * @param CacheManager $cacheManager |
||
58 | * @param StorageInterface $vichStorage |
||
59 | */ |
||
60 | public function addEventListeners(RequestContext $requestContext, CacheManager $cacheManager, StorageInterface $vichStorage) |
||
65 | |||
66 | /** |
||
67 | * @param DeserializationContext $context |
||
68 | * @param User|UserPictures $user |
||
69 | * @return ObjectEvent |
||
70 | */ |
||
71 | public function dispatchEvents($context, $user) |
||
80 | |||
81 | /** @noinspection MoreThanThreeArgumentsInspection |
||
82 | * |
||
83 | * Add post & pre serialize event to dispatcher |
||
84 | * |
||
85 | * @param EventDispatcher $dispatcher |
||
86 | * @param RequestContext $requestContext |
||
87 | * @param CacheManager $cacheManager |
||
88 | * @param StorageInterface $vichStorage |
||
89 | * @param array $config JMS serializer listner config |
||
90 | */ |
||
91 | public function addEvents(EventDispatcher $dispatcher, RequestContext $requestContext, CacheManager $cacheManager, StorageInterface $vichStorage, array $config = []) |
||
106 | } |
||
107 |