Skip to content
PHP Ecosystem
Explore

ManifestExpander

API reference › Scaffold › Manifest › ManifestExpander

final classPHPForge\Scaffold\Manifest\ManifestExpander
Sourcesrc/Manifest/ManifestExpander.php

Expands a validated manifest into file mappings; a later copy[] entry overrides an earlier one per destination.

MethodDescriptionDefined by
expand()Expands a validated manifest into the list of file mappings that the scaffolder must apply.ManifestExpander
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

ParameterTypeDescription
$manifestPHPForge\Scaffold\Manifest\ValidatedManifestValidated manifest as returned by ManifestSchema::validate().
$providerPathstringAbsolute path to the provider root on disk.
$providerNamestringComposer package name (used to attribute the mapping for provenance).

Returns

list<FileMapping>: Concrete list of mappings, ready for the scaffolder.

Throws