| 1 | <?php |
||
| 5 | class FileCollector |
||
| 6 | { |
||
| 7 | /** |
||
| 8 | * Regular expression pattern used to find files. |
||
| 9 | * @var string |
||
| 10 | */ |
||
| 11 | protected $filePattern; |
||
| 12 | |||
| 13 | /** |
||
| 14 | * Sets the regex pattern to use to find files. |
||
| 15 | * @param string $regex Regular Expression. |
||
| 16 | * @return self |
||
| 17 | */ |
||
| 18 | public function get($regex) |
||
| 23 | |||
| 24 | /** |
||
| 25 | * Looks in the provided $folder for files that match |
||
| 26 | * $this->filePattern and returns them. |
||
| 27 | * @param string $folder Folder path. |
||
| 28 | * @return array |
||
| 29 | */ |
||
| 30 | public function from($folder) |
||
| 49 | } |
||
| 50 |