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
string
getKey() : string
The key is the name used to identify the \FeaturePhp\Generator\Settings for a generator.
string
getRegisteredArtifacts() : array<mixed,\FeaturePhp\Artifact\Artifact>
array<mixed,\FeaturePhp\Artifact\Artifact>
getSettings() : \FeaturePhp\Generator\Settings
\FeaturePhp\Generator\Settings
hasArtifacts() : boolean
boolean
trace() : 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\TemplateFile
getExtendableFileFromSpecification(\FeaturePhp\Specification\Specification $specification) : \FeaturePhp\File\ExtendableFile
\FeaturePhp\Specification\Specification
\FeaturePhp\File\ExtendableFile
getSpecification(array $file, \FeaturePhp\Generator\Settings $settings, \FeaturePhp\Artifact\Artifact $artifact) : \FeaturePhp\Specification\TemplateSpecification
inherited_from | \FeaturePhp\Generator\ExtendGenerator::getSpecification() |
---|
array
a plain settings array
\FeaturePhp\Generator\Settings
the generator's settings
\FeaturePhp\Artifact\Artifact
the currently processed artifact
\FeaturePhp\Specification\TemplateSpecification
getSpecification(array $file, \FeaturePhp\Generator\Settings $settings, \FeaturePhp\Artifact\Artifact $artifact) : \FeaturePhp\Specification\Specification
array
a plain settings array
\FeaturePhp\Generator\Settings
the generator's settings
\FeaturePhp\Artifact\Artifact
the currently processed artifact
\FeaturePhp\Specification\Specification
isSelectedFeature(string $featureName) : boolean
string
boolean
generateFilesForArtifacts(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\ExtendableFile
getFileSettings(\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>