1 | <?php |
||
39 | class AnnotationClassFileReader { |
||
40 | |||
41 | /** @var \Brickoo\Component\Annotation\AnnotationReflectionClassReader */ |
||
42 | private $annotationReflectionReader; |
||
43 | |||
44 | /** |
||
45 | * Class constructor. |
||
46 | * @param \Brickoo\Component\Annotation\AnnotationReflectionClassReader $annotationReflectionReader |
||
47 | */ |
||
48 | 2 | public function __construct(AnnotationReflectionClassReader $annotationReflectionReader) { |
|
51 | |||
52 | /** |
||
53 | * |
||
54 | * @param \Brickoo\Component\Common\Collection $collection |
||
55 | * @param string $filename |
||
56 | * @throws \Brickoo\Component\Annotation\Exception\FileDoesNotExistException |
||
57 | * @throws \Brickoo\Component\Annotation\Exception\UnableToLocateQualifiedClassNameException |
||
58 | * @return \Brickoo\Component\Annotation\AnnotationReaderResult |
||
59 | */ |
||
60 | 4 | public function getAnnotations(Collection $collection, $filename) { |
|
65 | |||
66 | /** |
||
67 | * Returns the corresponding reflection class. |
||
68 | * @param string $filename |
||
69 | * @throws \Brickoo\Component\Annotation\Exception\UnableToLocateQualifiedClassNameException |
||
70 | * @return \ReflectionClass |
||
71 | */ |
||
72 | 3 | private function getReflectionClass($filename) { |
|
89 | |||
90 | /** |
||
91 | * Checks if the file exists and is readable. |
||
92 | * @param string $filename |
||
93 | * @throws \Brickoo\Component\Annotation\Exception\FileDoesNotExistException |
||
94 | * @return void |
||
95 | */ |
||
96 | 3 | private function checkFileAvailability($filename) { |
|
101 | |||
102 | /** |
||
103 | * Returns the file namespace. |
||
104 | * @param string $fileContent |
||
105 | * @return string the file namespace |
||
106 | */ |
||
107 | 2 | private function getNamespace($fileContent) { |
|
116 | |||
117 | /** |
||
118 | * Returns the class name. |
||
119 | * @param string $fileContent |
||
120 | * @return string the class name |
||
121 | */ |
||
122 | 2 | private function getClassName($fileContent) { |
|
127 | |||
128 | } |
||
129 |