1 | <?php |
||
25 | class GoAspectContainer extends Container implements AspectContainer |
||
26 | { |
||
27 | /** |
||
28 | * List of resources for application |
||
29 | * |
||
30 | * @var array |
||
31 | */ |
||
32 | protected $resources = []; |
||
33 | |||
34 | /** |
||
35 | * Cached timestamp for resources |
||
36 | * |
||
37 | * @var integer |
||
38 | */ |
||
39 | protected $maxTimestamp = 0; |
||
40 | |||
41 | /** |
||
42 | * Constructor for container |
||
43 | */ |
||
44 | 10 | public function __construct() |
|
116 | |||
117 | /** |
||
118 | * Returns a pointcut by identifier |
||
119 | * |
||
120 | * @param string $id Pointcut identifier |
||
121 | * |
||
122 | * @return Aop\Pointcut |
||
123 | */ |
||
124 | 1 | public function getPointcut($id) |
|
128 | |||
129 | /** |
||
130 | * Store the pointcut in the container |
||
131 | * |
||
132 | * @param Aop\Pointcut $pointcut Instance |
||
133 | * @param string $id Key for pointcut |
||
134 | */ |
||
135 | 1 | public function registerPointcut(Aop\Pointcut $pointcut, $id) |
|
139 | |||
140 | /** |
||
141 | * Returns an advisor by identifier |
||
142 | * |
||
143 | * @param string $id Advisor identifier |
||
144 | * |
||
145 | * @return Aop\Advisor |
||
146 | */ |
||
147 | public function getAdvisor($id) |
||
151 | |||
152 | /** |
||
153 | * Store the advisor in the container |
||
154 | * |
||
155 | * @param Aop\Advisor $advisor Instance |
||
156 | * @param string $id Key for advisor |
||
157 | */ |
||
158 | 1 | public function registerAdvisor(Aop\Advisor $advisor, $id) |
|
162 | |||
163 | /** |
||
164 | * Returns an aspect by id or class name |
||
165 | * |
||
166 | * @param string $aspectName Aspect name |
||
167 | * |
||
168 | * @return Aop\Aspect |
||
169 | */ |
||
170 | 1 | public function getAspect($aspectName) |
|
174 | |||
175 | /** |
||
176 | * Register an aspect in the container |
||
177 | * |
||
178 | * @param Aop\Aspect $aspect Instance of concrete aspect |
||
179 | */ |
||
180 | 1 | public function registerAspect(Aop\Aspect $aspect) |
|
186 | |||
187 | /** |
||
188 | * Add an AOP resource to the container |
||
189 | * |
||
190 | * Resources is used to check the freshness of AOP cache |
||
191 | */ |
||
192 | 2 | public function addResource($resource) |
|
197 | |||
198 | /** |
||
199 | * Returns list of AOP resources |
||
200 | * |
||
201 | * @return array |
||
202 | */ |
||
203 | public function getResources() |
||
207 | |||
208 | /** |
||
209 | * Checks the freshness of AOP cache |
||
210 | * |
||
211 | * @param integer $timestamp |
||
212 | * |
||
213 | * @return bool Whether or not concrete file is fresh |
||
214 | */ |
||
215 | 1 | public function isFresh($timestamp) |
|
223 | } |
||
224 |
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: