1 | <?php |
||
35 | class FileList implements FileListInterface, \Countable |
||
36 | { |
||
37 | use IteratorTrait; |
||
38 | |||
39 | protected $filelist = array(); |
||
40 | |||
41 | /** |
||
42 | * Add an SPL-File-Info to the filelist |
||
43 | * |
||
44 | * @param \SplFileInfo $file |
||
45 | * |
||
46 | * @return void |
||
47 | */ |
||
48 | 4 | public function add(\SplFileInfo $file) |
|
52 | |||
53 | /** |
||
54 | * Clear all entries from the filelist |
||
55 | * |
||
56 | * @return self |
||
57 | */ |
||
58 | 3 | public function clear() |
|
62 | |||
63 | /** |
||
64 | * Count elements of an object |
||
65 | * |
||
66 | * @link http://php.net/manual/en/countable.count.php |
||
67 | * @return int The custom count as an integer. |
||
68 | * </p> |
||
69 | * <p> |
||
70 | * The return value is cast to an integer. |
||
71 | */ |
||
72 | 2 | public function count() |
|
76 | |||
77 | /** |
||
78 | * Get the array the iterator shall iterate over. |
||
79 | * |
||
80 | * @return mixed |
||
81 | */ |
||
82 | protected function & getIteratorArray() |
||
86 | |||
87 | /** |
||
88 | * Sort the list using a given Sorter |
||
89 | * |
||
90 | * @param SorterInterface |
||
91 | * |
||
92 | * @return void |
||
93 | */ |
||
94 | public function sort(SorterInterface $sorter) |
||
98 | } |
||
99 |