1 | <?php // phpcs:ignore WordPress.Files.FileName |
||
21 | class ManifestGenerator { |
||
22 | |||
23 | /** |
||
24 | * Builds a manifest file for the given autoloader type. |
||
25 | * |
||
26 | * @param string $autoloaderType The type of autoloader to build a manifest for. |
||
27 | * @param string $fileName The filename of the manifest. |
||
28 | * @param array $content The manifest content to generate using. |
||
29 | * |
||
30 | * @return string|null $manifestFile |
||
31 | * @throws \InvalidArgumentException When an invalid autoloader type is given. |
||
32 | */ |
||
33 | public static function buildManifest( $autoloaderType, $fileName, $content ) { |
||
48 | |||
49 | /** |
||
50 | * Builds the contents for the standard manifest file. |
||
51 | * |
||
52 | * @param string $fileName The filename we are building. |
||
53 | * @param array $manifestData The formatted data for the manifest. |
||
54 | * |
||
55 | * @return string|null $manifestFile |
||
56 | */ |
||
57 | private static function buildStandardManifest( $fileName, $manifestData ) { |
||
73 | |||
74 | /** |
||
75 | * Builds the contents for the PSR-4 manifest file. |
||
76 | * |
||
77 | * @param string $fileName The filename we are building. |
||
78 | * @param array $namespaces The formatted PSR-4 data for the manifest. |
||
79 | * |
||
80 | * @return string|null $manifestFile |
||
81 | */ |
||
82 | private static function buildPsr4Manifest( $fileName, $namespaces ) { |
||
99 | |||
100 | /** |
||
101 | * Generate the PHP that will be used in the file. |
||
102 | * |
||
103 | * @param string $fileName The filename we are building. |
||
104 | * @param string $content The content to be written into the file. |
||
105 | * |
||
106 | * @return string $fileContent |
||
107 | */ |
||
108 | private static function buildFile( $fileName, $content ) { |
||
121 | } |
||
122 |