Composes classes from roles inside collaborations.
This generator implements the idea of collaboration-based design outlined in Chapter 6 of "Feature-Oriented Software Product Lines" (see http://www.springer.com/de/book/9783642375200). Features are mapped to collaborations (see \FeaturePhp\Collaboration\Collaboration) which are in turn a set of roles. A \FeaturePhp\Collaboration\Role is the base code for a class or a class refinement. Depending on the feature selection, corresponding roles in the collaborations are composed into a set of refined files (see \FeaturePhp\File\RefinedFile) implementing the selected features. The concrete composition mechanism may differ from language to language (see \FeaturePhp\Collaboration\Composer).
package | Default |
---|---|
inherited_from | \FeaturePhp\Generator\FileGenerator |
__construct(\FeaturePhp\Generator\Settings $settings)
inherited_from | \FeaturePhp\Generator\FileGenerator::__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
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\FileGenerator::_generateFiles() |
---|
_generateFiles()
isSelectedFeature(string $featureName) : boolean
string
boolean
processFileSpecification(\FeaturePhp\Artifact\Artifact $artifact, \FeaturePhp\Specification\FileSpecification $fileSpecification)
inherited_from | \FeaturePhp\Generator\FileGenerator::processFileSpecification() |
---|
\FeaturePhp\Artifact\Artifact
\FeaturePhp\Specification\FileSpecification
processFileSpecification(\FeaturePhp\Artifact\Artifact $artifact, \FeaturePhp\Specification\FileSpecification $fileSpecification)
\FeaturePhp\Artifact\Artifact
\FeaturePhp\Specification\FileSpecification
_processFileSpecification(\FeaturePhp\Artifact\Artifact $artifact, \FeaturePhp\Specification\FileSpecification $fileSpecification)
Considers globally excluded files. Only exact file names are supported.
\FeaturePhp\Artifact\Artifact
\FeaturePhp\Specification\FileSpecification
getFileOrDirectorySettings(\FeaturePhp\Generator\Settings $settings, string $key) : array<mixed,array>
\FeaturePhp\Generator\Settings
string
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>
$collaborations : array<mixed,\FeaturePhp\Generator\FeaturePhp\Collaboration\Collaboration>
$exclude : array<mixed,string>
$featureOrder : array<mixed,string>