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 | * @return array |
||
|
|||
42 | */ |
||
43 | public function loadFiles(array $files, $append = false) |
||
50 | |||
51 | public function loadFile($file, $append = false) |
||
55 | |||
56 | /** |
||
57 | * Allows for the addition of a custom decoder to the manager load files system. |
||
58 | * |
||
59 | * @param DecoderInterface $decoder |
||
60 | * @return mixed |
||
61 | */ |
||
62 | public function addDecoder(DecoderInterface $decoder) |
||
67 | |||
68 | /** |
||
69 | * @return FileLoader |
||
70 | */ |
||
71 | public function getFileLoader() |
||
75 | |||
76 | /** |
||
77 | * @param FileLoader $fileLoader |
||
78 | */ |
||
79 | public function setFileLoader($fileLoader) |
||
83 | } |
||
84 |
This check compares the return type specified in the
@return
annotation of a function or method doc comment with the types returned by the function and raises an issue if they mismatch.