Generates text files that can be extended by different artifacts.
In contrast, generators like \FeaturePhp\Generator\CopyGenerator allow no file modifications. For concrete implementations, see \FeaturePhp\Generator\ChunkGenerator or \FeaturePhp\Generator\TemplateGenerator.
package | Default |
---|---|
inherited_from | \FeaturePhp\Generator\Generator |
__construct(\FeaturePhp\Generator\Settings $settings)
inherited_from | \FeaturePhp\Generator\Generator::__construct() |
---|
\FeaturePhp\Generator\Settings
__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
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()
inherited_from | \FeaturePhp\Generator\Generator::_generateFiles() |
---|
_generateFiles()
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\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>