1 | <?php |
||
21 | class ConfigLoader |
||
22 | { |
||
23 | /** @var LoaderResolverInterface */ |
||
24 | private $loaderResolver; |
||
25 | |||
26 | /** |
||
27 | * Constructor |
||
28 | * |
||
29 | * @param LoaderInterface[] $loaders List of loaders |
||
30 | */ |
||
31 | public function __construct(array $loaders) |
||
35 | |||
36 | /** |
||
37 | * Loads a resource such as a file or an inline configuration |
||
38 | * |
||
39 | * @param string $resource Filename or string representation |
||
40 | * @param string $type The resource type. Doesn't set this argument in |
||
41 | * case of a filename passes as resource |
||
42 | * |
||
43 | * @return RepositoryInterface |
||
44 | * |
||
45 | * @throws LoaderLoadException If the loader not found |
||
46 | */ |
||
47 | public function load($resource, $type = null) : RepositoryInterface |
||
53 | |||
54 | private function resolveLoader($resource, $type = null) : LoaderInterface |
||
64 | } |
||
65 |