1 | <?php |
||
11 | class AnnotationArgumentResolver implements ArgumentResolver |
||
12 | { |
||
13 | /** |
||
14 | * Service annotation tag. |
||
15 | */ |
||
16 | const SERVICE_DOC_TAG = 'injectService'; |
||
17 | |||
18 | /** |
||
19 | * Resolve service arguments for Behat Context constructor thru annotation. |
||
20 | * Symfony2Extension ArgumentResoler will convert service names to actual instances. |
||
21 | * |
||
22 | * @param ReflectionClass $classReflection |
||
23 | * @param array $arguments |
||
24 | */ |
||
25 | public function resolveArguments(ReflectionClass $classReflection, array $arguments = []) |
||
40 | |||
41 | /** |
||
42 | * Returns a array with the method annotations. |
||
43 | * |
||
44 | * @return array array annotations |
||
45 | */ |
||
46 | private function getMethodAnnotations($refClass, $method = '__construct') |
||
57 | |||
58 | /** |
||
59 | * Returns an array with the method arguments service requirements, |
||
60 | * if the methods use the service Annotation. |
||
61 | * |
||
62 | * @return array array of methods and their service dependencies |
||
63 | */ |
||
64 | private function parseAnnotations($annotations) |
||
83 | } |
||
84 |