Skip to content
PHP Ecosystem
Explore

FileMapping

API reference › Scaffold › Manifest › FileMapping

final readonly classPHPForge\Scaffold\Manifest\FileMapping
Sourcesrc/Manifest/FileMapping.php

Represents one provider file to apply: its source, destination, write mode and merge strategy.

PropertyTypeDescriptionDefined by
$destination readonly constructorstringDestination path relative to the project root, using forward slashes.FileMapping
$mergeStrategy readonly constructorPHPForge\Scaffold\Merge\MergeStrategyKind|nullMerge strategy declared by the manifest merge map for the append mode, or null to resolve it from the destination basename. Default: null.FileMapping
$mode readonly constructorFileModeWrite mode applied to the destination.FileMapping
$providerName readonly constructorstringComposer package name of the provider.FileMapping
$providerPath readonly constructorstringAbsolute path to the provider root on disk.FileMapping
$source readonly constructorstringSource path relative to the provider root, using forward slashes.FileMapping
MethodDescriptionDefined by
__construct()Creates a provider file mapping.FileMapping
public function __construct(string $destination, string $source, PHPForge\Scaffold\Manifest\FileMode $mode, string $providerName, string $providerPath, PHPForge\Scaffold\Merge\MergeStrategyKind|null $mergeStrategy = null)

Creates a provider file mapping.

Parameters

ParameterTypeDescription
$destinationstringDestination path relative to the project root, using forward slashes.
$sourcestringSource path relative to the provider root, using forward slashes.
$modeFileModeWrite mode applied to the destination.
$providerNamestringComposer package name of the provider.
$providerPathstringAbsolute path to the provider root on disk.
$mergeStrategyPHPForge\Scaffold\Merge\MergeStrategyKind|nullMerge strategy declared by the manifest merge map for the append mode, or null to resolve it from the destination basename.