A product of a software product line.
A product is a concrete variant of a \FeaturePhp\ProductLine\ProductLine. Its \FeaturePhp\Model\Configuration defines which features are selected and deselected. A product can be analyzed, generated (or derived) and exported automatically.
| package | Default |
|---|
__construct(\FeaturePhp\ProductLine\ProductLine $productLine, \FeaturePhp\Model\Configuration $configuration, boolean $allowInvalid = false)
Throws \FeaturePhp\ProductLine\ProductException if the configuration is invalid.
\FeaturePhp\ProductLine\ProductLine
\FeaturePhp\Model\Configuration
booleanwhether to throw an exception if the configuration is invalid
export(\FeaturePhp\Exporter\Exporter $exporter)
Depending on the exporter, this has a side effect, e.g. downloading a file.
\FeaturePhp\Exporter\Exporter
generateFiles() : array<mixed,\FeaturePhp\File\File>
array<mixed,\FeaturePhp\File\File>getConfiguration() : \FeaturePhp\Model\Configuration
\FeaturePhp\Model\ConfigurationgetProductLine() : \FeaturePhp\ProductLine\ProductLine
\FeaturePhp\ProductLine\ProductLinerenderAnalysis(boolean $textOnly = false) : string
booleanwhether to render text or HTML
stringtrace() : array<mixed,\FeaturePhp\Artifact\TracingLink>
array<mixed,\FeaturePhp\Artifact\TracingLink>addArtifactToUsedGenerators(array<mixed,\FeaturePhp\Generator\Generator> $allGenerators, \FeaturePhp\Model\Feature $feature, callable $func)
This is done independently from whether the corresponding feature is selected or deselected to support generating code for both cases.
array<mixed,\FeaturePhp\Generator\Generator>
\FeaturePhp\Model\Feature
callablewhether to add a selected or deselected artifact
getAllGenerators() : array<mixed,\FeaturePhp\Generator\Generator>
The generators are instantiated with their respective generator settings.
array<mixed,\FeaturePhp\Generator\Generator>getGeneratorElements(callable $func) : array<mixed,mixed>
To do this, every artifact is registered with the generators it specifies. Then every generator generates some elements. Finally all the elements are merged.
callable
array<mixed,mixed>$configuration : \FeaturePhp\Model\Configuration
$productLine : \FeaturePhp\ProductLine\ProductLine