A renderer for a configuration and its model.

This renders a \FeaturePhp\Model\Configuration and its \FeaturePhp\Model\Model analysis as a web page. The model analysis includes a list of features and descriptions. The configuration analysis lists selected and deselected features and evaluates the configuration's validity.

package Default
inherited_from \FeaturePhp\Renderer

 Methods

Creates a configuration renderer.

__construct(\FeaturePhp\Model\Configuration $configuration, \FeaturePhp\ProductLine\ProductLine $productLine = null

Parameters

$configuration

\FeaturePhp\Model\Configuration

$productLine

\FeaturePhp\ProductLine\ProductLine

Returns the model and configuration analysis.

_render(boolean $textOnly) : string
inherited_from \FeaturePhp\Renderer::_render()

Parameters

$textOnly

boolean

whether to render text or HTML

Returns

string

Returns the renderer's web page.

render(boolean $textOnly = false) : string
Inherited

Parameters

$textOnly

boolean

whether to render text or HTML

Returns

string

Returns the renderer's web page as text only.

renderText() : string
Inherited

This is used by the command-line interface.

Returns

string

Internal function for returning the renderer's web page.

_render(boolean $textOnly) : string
Inherited

Parameters

$textOnly

boolean

whether to render text or HTML

Returns

string

Returns a simple stylesheet.

getStyle() : string
Inherited

Returns

string

Returns a configuration analysis.

analyzeConfiguration(\FeaturePhp\Model\Configuration $configuration, boolean $textOnly) : string

Parameters

$configuration

\FeaturePhp\Model\Configuration

$textOnly

boolean

whether to render text or HTML

Returns

string

Returns a model analysis.

analyzeModel(\FeaturePhp\Model\Model $model, boolean $textOnly) : string

Parameters

$model

\FeaturePhp\Model\Model

$textOnly

boolean

whether to render text or HTML

Returns

string

 Properties

 

accent color for text only rendering

$accentColor : string

Default

"\033[1;33m"
 

default color for text only rendering

$defaultColor : string

Default

"\033[0m"
 

the configuration that will be analyzed

$configuration : \FeaturePhp\Model\Configuration

Default

 

the associated product line

$productLine : \FeaturePhp\ProductLine\ProductLine | null

Default