Generates text files by replacing parts of template files.
A selected artifact can specify template files and corresponding replacement rules (see \FeaturePhp\Specification\TemplateSpecification and \FeaturePhp\Specification\ReplacementRule). The rules are applied to the template files to generate new, configuration-specific files.
| package | Default |
|---|---|
| inherited_from | \FeaturePhp\Generator\ExtendGenerator |
__construct(\FeaturePhp\Generator\Settings $settings)
\FeaturePhp\Generator\Settings
addDeselectedArtifact(\FeaturePhp\Artifact\Artifact $artifact)
\FeaturePhp\Artifact\Artifact
addSelectedArtifact(\FeaturePhp\Artifact\Artifact $artifact)
\FeaturePhp\Artifact\Artifact
generateFiles() : array<mixed,\FeaturePhp\File\File>
If the files have already been generated, returns the cached files. The generator's log file is included.
array<mixed,\FeaturePhp\File\File>getGeneratorMap() : array<mixed,string>
array<mixed,string>getKey() : string
stringgetKey() : string
The key is the name used to identify the \FeaturePhp\Generator\Settings for a generator.
stringgetRegisteredArtifacts() : array<mixed,\FeaturePhp\Artifact\Artifact>
array<mixed,\FeaturePhp\Artifact\Artifact>getSettings() : \FeaturePhp\Generator\Settings
\FeaturePhp\Generator\SettingshasArtifacts() : boolean
booleantrace() : array<mixed,\FeaturePhp\Artifact\TracingLink>
array<mixed,\FeaturePhp\Artifact\TracingLink>_generateFiles()
getExtendableFileFromSpecification(\FeaturePhp\Specification\TemplateSpecification $templateSpecification) : \FeaturePhp\File\TemplateFile
| inherited_from | \FeaturePhp\Generator\ExtendGenerator::getExtendableFileFromSpecification() |
|---|
\FeaturePhp\Specification\TemplateSpecification
\FeaturePhp\File\TemplateFilegetExtendableFileFromSpecification(\FeaturePhp\Specification\Specification $specification) : \FeaturePhp\File\ExtendableFile
\FeaturePhp\Specification\Specification
\FeaturePhp\File\ExtendableFilegetSpecification(array $file, \FeaturePhp\Generator\Settings $settings, \FeaturePhp\Artifact\Artifact $artifact) : \FeaturePhp\Specification\TemplateSpecification
| inherited_from | \FeaturePhp\Generator\ExtendGenerator::getSpecification() |
|---|
arraya plain settings array
\FeaturePhp\Generator\Settingsthe generator's settings
\FeaturePhp\Artifact\Artifactthe currently processed artifact
\FeaturePhp\Specification\TemplateSpecificationgetSpecification(array $file, \FeaturePhp\Generator\Settings $settings, \FeaturePhp\Artifact\Artifact $artifact) : \FeaturePhp\Specification\Specification
arraya plain settings array
\FeaturePhp\Generator\Settingsthe generator's settings
\FeaturePhp\Artifact\Artifactthe currently processed artifact
\FeaturePhp\Specification\SpecificationisSelectedFeature(string $featureName) : boolean
string
booleangenerateFilesForArtifacts(array<mixed,\FeaturePhp\Artifact\Artifact> $artifacts, callable $fileSettingsGetter, boolean $extend)
array<mixed,\FeaturePhp\Artifact\Artifact>
callable
boolean
getExtendableFile(\FeaturePhp\Specification\Specification $specification) : \FeaturePhp\File\ExtendableFile
If the extendable file was already created, returns the cached extendable file. If the extendable file does not yet exist, create it if it may be created from this specification.
\FeaturePhp\Specification\Specification
\FeaturePhp\File\ExtendableFilegetFileSettings(\FeaturePhp\Generator\Settings $settings) : array<mixed,array>
\FeaturePhp\Generator\Settings
array<mixed,array>getFileSettingsForDeselected(\FeaturePhp\Generator\Settings $settings) : array<mixed,array>
\FeaturePhp\Generator\Settings
array<mixed,array>getFileSettingsForSelected(\FeaturePhp\Generator\Settings $settings) : array<mixed,array>
\FeaturePhp\Generator\Settings
array<mixed,array>getGenerators() : array<mixed,string>
array<mixed,string>$deselectedArtifacts : array<mixed,\FeaturePhp\Artifact\Artifact>
$files : array<mixed,\FeaturePhp\File\File>
$logFile : \FeaturePhp\File\LogFile
$selectedArtifacts : array<mixed,\FeaturePhp\Artifact\Artifact>
$settings : \FeaturePhp\Generator\Settings
$tracingLinks : array<mixed,\FeaturePhp\Artifact\TracingLink>
$extendableFiles : array<mixed,\FeaturePhp\File\ExtendableFile>