1 | <?php |
||
15 | class AssetsBuilder |
||
16 | { |
||
17 | |||
18 | |||
19 | /** |
||
20 | * @var InstallationManager |
||
21 | */ |
||
22 | private $installationManager; |
||
23 | /** |
||
24 | * @var IOInterface |
||
25 | */ |
||
26 | private $io; |
||
27 | /** |
||
28 | * @var string |
||
29 | */ |
||
30 | private $rootDir; |
||
31 | |||
32 | public function __construct(InstallationManager $installationManager, IOInterface $io, string $rootDir) |
||
38 | |||
39 | |||
40 | /** |
||
41 | * Builds the AssetTypes that will be exported in the generated TheCodingMachine\Discovery class. |
||
42 | * |
||
43 | * @param PackageInterface[] $discoveryPackages |
||
44 | * |
||
45 | * @return AssetType[] An array of AssetType, indexed by asset type name. |
||
46 | */ |
||
47 | public function buildAssetTypes(array $discoveryPackages) : array |
||
71 | |||
72 | /** |
||
73 | * Returns the parsed JSON of the discovery.json file of a package. |
||
74 | * |
||
75 | * @param PackageInterface $package |
||
76 | * |
||
77 | * @return AssetOperation[][] |
||
78 | * |
||
79 | * @throws \TheCodingMachine\Discovery\Utils\JsonException |
||
80 | */ |
||
81 | private function getDiscoveryJson(PackageInterface $package) : array |
||
95 | } |
||
96 |