1 | <?php |
||
10 | abstract class FileLoader extends Loader |
||
11 | { |
||
12 | /** @var array to track circular references */ |
||
13 | protected static $loading = []; |
||
14 | |||
15 | /** @var FileLocatorInterface */ |
||
16 | private $locator; |
||
17 | /** @var string */ |
||
18 | private $currentDir; |
||
19 | |||
20 | 8 | public function __construct(FileLocatorInterface $locator) |
|
24 | |||
25 | /** |
||
26 | * @param string $currentDir |
||
27 | */ |
||
28 | 8 | public function setCurrentDir($currentDir) |
|
32 | |||
33 | /** |
||
34 | * Imports a resource. |
||
35 | * |
||
36 | * @param mixed $resource A Resource |
||
37 | * @param string|null $type The resource type or null if unknown |
||
38 | * @param bool $ignoreErrors Whether to ignore import errors or not |
||
39 | * @param string|null $sourceResource The original resource importing the new resource |
||
40 | * |
||
41 | * @return mixed |
||
42 | * @throws FileLoaderException |
||
43 | * @throws CircularReferenceLoaderException |
||
44 | */ |
||
45 | 8 | public function import($resource, $type = null, $ignoreErrors = false, $sourceResource = null) |
|
89 | |||
90 | /** |
||
91 | * @return FileLocatorInterface |
||
92 | */ |
||
93 | 8 | public function getLocator() |
|
97 | } |
||
98 |