1 | <?php |
||
35 | class ClassMapList implements FileListInterface, \Countable |
||
36 | { |
||
37 | use IteratorTrait; |
||
38 | |||
39 | protected $list = array(); |
||
40 | |||
41 | /** |
||
42 | * Add an SPL-File-Info to the filelist |
||
43 | * |
||
44 | * @param \SplFileInfo $file |
||
45 | 1 | * |
|
46 | * @return void |
||
47 | 1 | */ |
|
48 | public function add(\SplFileInfo $file) |
||
63 | |||
64 | /** |
||
65 | * Clear all entries from the filelist |
||
66 | * |
||
67 | 1 | * @return void |
|
68 | */ |
||
69 | 1 | public function clear() |
|
73 | |||
74 | /** |
||
75 | * (PHP 5 >= 5.1.0)<br/> |
||
76 | * Count elements of an object |
||
77 | * |
||
78 | * @link http://php.net/manual/en/countable.count.php |
||
79 | * @return int The custom count as an integer. |
||
80 | 1 | * </p> |
|
81 | * <p> |
||
82 | 1 | * The return value is cast to an integer. |
|
83 | */ |
||
84 | public function count() |
||
88 | |||
89 | /** |
||
90 | * Get the content as array |
||
91 | * |
||
92 | 1 | * @return array |
|
93 | */ |
||
94 | 1 | public function toArray() |
|
98 | |||
99 | /** |
||
100 | * Get the array the iterator shall iterate over. |
||
101 | * |
||
102 | * @return mixed |
||
103 | */ |
||
104 | 4 | protected function & getIteratorArray() |
|
108 | } |
||
109 |