1 | <?php |
||
15 | trait DalActionTrait |
||
16 | { |
||
17 | /** |
||
18 | * @var ValidatorInterface |
||
19 | */ |
||
20 | protected $validator; |
||
21 | |||
22 | /** |
||
23 | * @var EventDispatcherInterface |
||
24 | */ |
||
25 | protected $eventDispatcher; |
||
26 | |||
27 | /** |
||
28 | * define event dispatcher. |
||
29 | * |
||
30 | * @param EventDispatcherInterface $eventDispatcher |
||
31 | */ |
||
32 | public function setEventDispatcher(EventDispatcherInterface $eventDispatcher) |
||
36 | |||
37 | /** |
||
38 | * define validator. |
||
39 | * |
||
40 | * @param ValidatorInterface $validator |
||
41 | */ |
||
42 | public function setValidator(ValidatorInterface $validator) |
||
46 | |||
47 | /** |
||
48 | * assert given entity is valid on given scope. |
||
49 | * |
||
50 | * @param object $entity |
||
51 | * @param string|array $scope |
||
52 | * |
||
53 | * @throws ValidationException If given object is invalid on given scope |
||
54 | */ |
||
55 | protected function assertEntityIsValid($entity, $scope = null) |
||
78 | |||
79 | /** |
||
80 | * fire given event. |
||
81 | * |
||
82 | * @param string $eventName |
||
83 | * @param Event $event |
||
84 | * |
||
85 | * @throws \BadMethodCallException If any event dispatcher set |
||
86 | */ |
||
87 | protected function fireEvent($eventName, Event $event) |
||
98 | |||
99 | /** |
||
100 | * @see NormalizableInterface::getScopes() |
||
101 | */ |
||
102 | public static function getScopes() |
||
106 | |||
107 | /** |
||
108 | * @see NormalizableInterface::normalize() |
||
109 | */ |
||
110 | public function normalize($scope = 'default') |
||
114 | |||
115 | /** |
||
116 | * @see NormalizableInterface::denormalize() |
||
117 | */ |
||
118 | public function denormalize(array $data) |
||
122 | } |
||
123 |
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.