1 | <?php |
||
11 | class ModmanParser implements Parser |
||
12 | { |
||
13 | |||
14 | /** |
||
15 | * @var \SplFileObject The modman file |
||
16 | */ |
||
17 | protected $file; |
||
18 | |||
19 | /** |
||
20 | * |
||
21 | * @param string $modManFile |
||
22 | */ |
||
23 | 4 | public function __construct($modManFile) |
|
27 | |||
28 | /** |
||
29 | * @return array |
||
30 | * @throws \ErrorException |
||
31 | */ |
||
32 | 4 | public function getMappings() |
|
33 | { |
||
34 | 4 | if (!$this->file->isReadable()) { |
|
35 | 1 | throw new \ErrorException(sprintf('modman file "%s" not readable', $this->file->getPathname())); |
|
36 | } |
||
37 | |||
38 | 3 | $map = $this->parseMappings(); |
|
39 | 2 | return $map; |
|
40 | } |
||
41 | |||
42 | /** |
||
43 | * @throws \ErrorException |
||
44 | * @return array |
||
45 | */ |
||
46 | 2 | protected function parseMappings() |
|
72 | } |
||
73 |