1 | <?php |
||
10 | class PackageFinder |
||
11 | { |
||
12 | private $fileGlob; |
||
13 | private $baseFolder; |
||
14 | private $fileList; |
||
15 | |||
16 | /** |
||
17 | * @param string $folder Folder to search for SPK files |
||
18 | * @param string $glob Filemask for package files (default: '*.spk') |
||
19 | * @throws \Exception if $folder is not a folder. |
||
20 | */ |
||
21 | 9 | public function __construct($folder, $glob = '*.spk') |
|
33 | |||
34 | /** |
||
35 | * Searches the currently set folder with the set glob for package files. |
||
36 | */ |
||
37 | 7 | private function searchPackageFiles() |
|
41 | |||
42 | /** |
||
43 | * Returns all found package files. |
||
44 | * |
||
45 | * @return array List of package files. |
||
46 | */ |
||
47 | 1 | public function getAllPackageFiles() |
|
51 | |||
52 | /** |
||
53 | * Returns all found packages as objects. |
||
54 | * |
||
55 | * @return \SSpkS\Package\Package[] List of packages as objects. |
||
56 | */ |
||
57 | 6 | public function getAllPackages() |
|
65 | } |
||
66 |