1 | <?php |
||
25 | class GeneralAspectLoaderExtension extends AbstractAspectLoaderExtension |
||
26 | { |
||
27 | |||
28 | /** |
||
29 | * General aspect loader works with annotations from aspect |
||
30 | * |
||
31 | * For extension that works with annotations additional metaInformation will be passed |
||
32 | * |
||
33 | * @return string |
||
34 | */ |
||
35 | public function getKind() |
||
39 | |||
40 | /** |
||
41 | * General aspect loader works only with methods of aspect |
||
42 | * |
||
43 | * @return string|array |
||
44 | */ |
||
45 | 2 | public function getTarget() |
|
49 | |||
50 | /** |
||
51 | * Checks if loader is able to handle specific point of aspect |
||
52 | * |
||
53 | * @param Aspect $aspect Instance of aspect |
||
54 | * @param mixed|\ReflectionClass|\ReflectionMethod|\ReflectionProperty $reflection Reflection of point |
||
55 | * @param mixed|null $metaInformation Additional meta-information, e.g. annotation for method |
||
56 | * |
||
57 | * @return boolean true if extension is able to create an advisor from reflection and metaInformation |
||
58 | */ |
||
59 | public function supports(Aspect $aspect, $reflection, $metaInformation = null) |
||
64 | |||
65 | /** |
||
66 | * Loads definition from specific point of aspect into the container |
||
67 | * |
||
68 | * @param Aspect $aspect Instance of aspect |
||
69 | * @param mixed|\ReflectionClass|\ReflectionMethod|\ReflectionProperty $reflection Reflection of point |
||
70 | * @param mixed|null $metaInformation Additional meta-information, e.g. annotation for method |
||
71 | * |
||
72 | * @return array|Pointcut[]|Advisor[] |
||
73 | * |
||
74 | * @throws \UnexpectedValueException |
||
75 | */ |
||
76 | public function load(Aspect $aspect, $reflection, $metaInformation = null) |
||
101 | |||
102 | /** |
||
103 | * @param $metaInformation |
||
104 | * @param $adviceCallback |
||
105 | * @return \Go\Aop\Intercept\Interceptor |
||
106 | * @throws \UnexpectedValueException |
||
107 | */ |
||
108 | protected function getInterceptor($metaInformation, $adviceCallback) |
||
129 | } |
||
130 |