1 | <?php |
||
18 | trait LoadsFilesTrait |
||
19 | { |
||
20 | use DependsOnManagesItemsTrait; |
||
21 | |||
22 | /** @var \Michaels\Manager\FileLoader Instance of the FileLoader */ |
||
23 | protected $fileLoader; |
||
24 | |||
25 | /** |
||
26 | * Makes sure a FileLoader object was created or creates one. |
||
27 | * @param FileLoader $fileLoader |
||
28 | */ |
||
29 | protected function initializeFileLoader(FileLoader $fileLoader = null) |
||
35 | |||
36 | /** |
||
37 | * This method adds the file loading functionality. |
||
38 | * |
||
39 | * @param array $files an array of SplFileInfo Objects |
||
40 | * @param $append boolean true, if data should be appended to the manager. |
||
41 | * @param bool $namespace |
||
42 | * @param bool $strict |
||
43 | * @return void |
||
44 | */ |
||
45 | public function loadFiles(array $files, $append = false, $namespace = true, $strict = true) |
||
52 | |||
53 | public function loadFile($file, $append = false, $namespace = true) |
||
57 | |||
58 | /** |
||
59 | * Allows for the addition of a custom decoder to the manager load files system. |
||
60 | * |
||
61 | * @param DecoderInterface $decoder |
||
62 | * @return mixed |
||
63 | */ |
||
64 | public function addDecoder(DecoderInterface $decoder) |
||
69 | |||
70 | /** |
||
71 | * @return FileLoader |
||
72 | */ |
||
73 | public function getFileLoader() |
||
77 | |||
78 | /** |
||
79 | * @param FileLoader $fileLoader |
||
80 | */ |
||
81 | public function setFileLoader($fileLoader) |
||
85 | } |
||
86 |