@@ 51-55 (lines=5) @@ | ||
48 | } |
|
49 | ||
50 | $found = false; |
|
51 | if (is_readable("$item.php") && is_file("$item.php")) { |
|
52 | $services = require "$item.php"; |
|
53 | $this->createServicesFromArray($services, $item); |
|
54 | $found = true; |
|
55 | } |
|
56 | ||
57 | if (is_readable($item) && is_dir($item)) { |
|
58 | foreach (glob("$item/*.php") as $file) { |
|
@@ 57-63 (lines=7) @@ | ||
54 | $found = true; |
|
55 | } |
|
56 | ||
57 | if (is_readable($item) && is_dir($item)) { |
|
58 | foreach (glob("$item/*.php") as $file) { |
|
59 | $services = require "$file"; |
|
60 | $this->createServicesFromArray($services, $file); |
|
61 | $found = true; |
|
62 | } |
|
63 | } |
|
64 | ||
65 | if (!$found) { |
|
66 | throw new Exception("Item to load configuration from was no file, dir nor an array."); |