A configuration of a software product line.

A configuration is a set of selected features of a feature model, implying a set of deselected features as well (\FeaturePhp\Model\Feature and \FeaturePhp\Model\Model). (Partial configurations are not needed on the server-side.) A configuration may be valid or invalid, this is determined by a the feature model's \FeaturePhp\Model\ConstraintSolver. The underlying XML configuration has its own class, \FeaturePhp\Model\XmlConfiguration.

package Default

 Methods

Creates a configuration.

__construct(\FeaturePhp\Model\Model $model, \FeaturePhp\Model\XmlConfiguration $xmlConfiguration) 

Parameters

$model

\FeaturePhp\Model\Model

$xmlConfiguration

\FeaturePhp\Model\XmlConfiguration

Returns the configuration's deselected features.

getDeselectedFeatures() : array<mixed,\FeaturePhp\Model\Feature>

Returns

array<mixed,\FeaturePhp\Model\Feature>

Returns the feature model the configuration relates to.

getModel() : \FeaturePhp\Model\Model

Returns

\FeaturePhp\Model\Model

Returns the configuration's selected features.

getSelectedFeatures() : array<mixed,\FeaturePhp\Model\Feature>

Returns

array<mixed,\FeaturePhp\Model\Feature>

Returns the configuration's value for a value feature.

getValue(\FeaturePhp\Model\ValueFeature $feature) : string

Parameters

$feature

\FeaturePhp\Model\ValueFeature

Returns

string

Returns the underlying XML configuration.

getXmlConfiguration() : \FeaturePhp\Model\XmlConfiguration

Returns

\FeaturePhp\Model\XmlConfiguration

Returns whether the configuration is valid.

isValid() : boolean

Returns

boolean

Analyzes the model and configuration by returning a web page.

renderAnalysis(\FeaturePhp\ProductLine\ProductLine $productLine = null, boolean $textOnly = false) : string

Parameters

$productLine

\FeaturePhp\ProductLine\ProductLine

optional product line to render more information

$textOnly

boolean

whether to render text or HTML

Returns

string

 Properties

 

all deselected features in the configuration

$deselectedFeatures : array<mixed,\FeaturePhp\Model\Feature>

Default

 

the feature model the configuration relates to

$model : \FeaturePhp\Model\Model

Default

 

all selected features in the configuration

$selectedFeatures : array<mixed,\FeaturePhp\Model\Feature>

Default

 

the underlying XML configuration

$xmlConfiguration : \FeaturePhp\Model\XmlConfiguration

Default