ManifestExpander
API reference › Scaffold › Manifest › ManifestExpander
Expands a validated manifest into file mappings; a later copy[] entry overrides an earlier one per destination.
Methods
Section titled “Methods”| Method | Description | Defined by |
|---|---|---|
expand() | Expands a validated manifest into the list of file mappings that the scaffolder must apply. | ManifestExpander |
Method details
Section titled “Method details”expand()
Section titled “expand() ”public function expand(PHPForge\Scaffold\Manifest\ValidatedManifest $manifest, string $providerPath, string $providerName): list<PHPForge\Scaffold\Manifest\FileMapping>Expands a validated manifest into the list of file mappings that the scaffolder must apply.
Parameters
| Parameter | Type | Description |
|---|---|---|
$manifest | PHPForge\ | Validated manifest as returned by ManifestSchema::validate(). |
$providerPath | string | Absolute path to the provider root on disk. |
$providerName | string | Composer package name (used to attribute the mapping for provenance). |
Returns
list<FileMapping>: Concrete list of mappings, ready for the scaffolder.
Throws
RuntimeException: when a path listed incopy[]does not exist on disk.