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