1 | <?php |
||
18 | abstract class AbstractRouteEvent extends DispatchEvent implements |
||
19 | RouteEventInterface |
||
20 | { |
||
21 | /** |
||
22 | * Route match param name |
||
23 | */ |
||
24 | const ROUTE_MATCH = 'routeMatch'; |
||
25 | |||
26 | /** |
||
27 | * @var DispatchEvent |
||
28 | */ |
||
29 | private $parentEvent; |
||
30 | |||
31 | /** |
||
32 | * @param DispatchEvent $event |
||
33 | */ |
||
34 | public function __construct(DispatchEvent $event) |
||
41 | |||
42 | /** |
||
43 | * {@inheritdoc} |
||
44 | */ |
||
45 | public function getResponse() |
||
49 | |||
50 | /** |
||
51 | * {@inheritdoc} |
||
52 | */ |
||
53 | public function setResponse($response) |
||
58 | |||
59 | /** |
||
60 | * Get a specific parameter |
||
61 | * |
||
62 | * @param string $name |
||
63 | * @param mixed $default |
||
64 | * @return mixed |
||
65 | */ |
||
66 | public function getParam($name, $default = null) |
||
70 | |||
71 | /** |
||
72 | * Set value to a parameter |
||
73 | * |
||
74 | * @param string|int $name |
||
75 | * @param mixed $value |
||
76 | * @return $this |
||
77 | */ |
||
78 | public function setParam($name, $value) |
||
83 | |||
84 | /** |
||
85 | * Get all parameters |
||
86 | * |
||
87 | * @return array|object|\ArrayAccess |
||
88 | */ |
||
89 | public function getParams() |
||
93 | |||
94 | /** |
||
95 | * Set parameters |
||
96 | * |
||
97 | * Overwrites parameters |
||
98 | * |
||
99 | * @param array|\ArrayAccess|object $params |
||
100 | * @return $this |
||
101 | * @throws \Zend\EventManager\Exception\InvalidArgumentException |
||
102 | */ |
||
103 | public function setParams($params) |
||
110 | |||
111 | /** |
||
112 | * @return \Zend\Mvc\Router\Http\RouteMatch |
||
113 | */ |
||
114 | public function getRouteMatch() |
||
124 | } |
||
125 |
It seems like the type of the argument is not accepted by the function/method which you are calling.
In some cases, in particular if PHP’s automatic type-juggling kicks in this might be fine. In other cases, however this might be a bug.
We suggest to add an explicit type cast like in the following example: