Conditions | 2 |
Paths | 2 |
Total Lines | 18 |
Code Lines | 10 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
19 | public function list($dir) |
||
20 | { |
||
21 | $this->aliasLoader = new SiteAliasFileLoader(); |
||
22 | $ymlLoader = new YamlDataFileLoader(); |
||
23 | $this->aliasLoader->addLoader('yml', $ymlLoader); |
||
24 | |||
25 | $this->io()->note("loading from $dir"); |
||
26 | |||
27 | $this->aliasLoader->addSearchLocation($dir); |
||
28 | |||
29 | $all = $this->aliasLoader->loadAll(); |
||
30 | |||
31 | if (empty($all)) { |
||
32 | throw new \Exception("No aliases found"); |
||
33 | } |
||
34 | |||
35 | return $all; |
||
36 | } |
||
37 | } |
||
38 |