1 | <?php |
||
35 | class FileList implements FileListInterface, \Countable |
||
36 | { |
||
37 | protected $filelist = array(); |
||
38 | |||
39 | /** |
||
40 | * Add an SPL-File-Info to the filelist |
||
41 | * |
||
42 | * @param \SplFileInfo $file |
||
43 | * |
||
44 | * @return void |
||
45 | */ |
||
46 | 4 | public function add(\SplFileInfo $file) |
|
50 | |||
51 | /** |
||
52 | * Clear all entries from the filelist |
||
53 | * |
||
54 | * @return self |
||
55 | */ |
||
56 | 3 | public function clear() |
|
60 | |||
61 | /** |
||
62 | * Return the current element |
||
63 | * |
||
64 | * @link http://php.net/manual/en/iterator.current.php |
||
65 | * @return mixed Can return any type. |
||
66 | */ |
||
67 | 2 | public function current() |
|
71 | |||
72 | /** |
||
73 | * Move forward to next element |
||
74 | * |
||
75 | * @link http://php.net/manual/en/iterator.next.php |
||
76 | * @return void Any returned value is ignored. |
||
77 | */ |
||
78 | 2 | public function next() |
|
82 | |||
83 | /** |
||
84 | * Return the key of the current element |
||
85 | * |
||
86 | * @link http://php.net/manual/en/iterator.key.php |
||
87 | * @return mixed scalar on success, or null on failure. |
||
88 | */ |
||
89 | 1 | public function key() |
|
93 | |||
94 | /** |
||
95 | * Checks if current position is valid |
||
96 | * |
||
97 | * @link http://php.net/manual/en/iterator.valid.php |
||
98 | * @return boolean The return value will be casted to boolean and then evaluated. |
||
99 | * Returns true on success or false on failure. |
||
100 | */ |
||
101 | 1 | public function valid() |
|
105 | |||
106 | /** |
||
107 | * Rewind the Iterator to the first element |
||
108 | * |
||
109 | * @link http://php.net/manual/en/iterator.rewind.php |
||
110 | * @return void Any returned value is ignored. |
||
111 | */ |
||
112 | 2 | public function rewind() |
|
116 | |||
117 | /** |
||
118 | * Count elements of an object |
||
119 | * |
||
120 | * @link http://php.net/manual/en/countable.count.php |
||
121 | * @return int The custom count as an integer. |
||
122 | * </p> |
||
123 | * <p> |
||
124 | * The return value is cast to an integer. |
||
125 | */ |
||
126 | 2 | public function count() |
|
130 | } |
||
131 |