PHP Class Devise\Pages\Viewvars\DataBuilder

显示文件 Open project: devisephp/cms

Public Methods

Method Description
__construct ( DataCrawler $DataCrawler ) Construct a new data builder
compile ( $queue ) : array Injects data from config into the current view
getData ( ) : array Get the data for the view composer
getValue ( $options ) : array Gets the value of the view variable from options by parsing the options string and also any parameters for this specific variable.
setData ( array $data ) : array Set the data that will be used by a view composer

Private Methods

Method Description
fillParamRequest ( $paramRequestList ) : array Loops through params in views config and fills the value of each parameter key => value pair
fillWithNulls ( array $failures ) : void Fill the failures with null values
loadClass ( $path ) : array Uses the path from config to load a class if the class is already loaded the instance is returned
processQueue ( array $queue ) : void Process queue takes an array and gets the computed value of each value from the array. It populates $this->data which is used later by the view composer when it calls the getData() method.

Method Details

__construct() public method

Construct a new data builder
public __construct ( DataCrawler $DataCrawler )
$DataCrawler DataCrawler

compile() public method

Injects data from config into the current view
public compile ( $queue ) : array
return array

getData() public method

Get the data for the view composer
public getData ( ) : array
return array

getValue() public method

Gets the value of the view variable from options by parsing the options string and also any parameters for this specific variable.
public getValue ( $options ) : array
$options
return array

setData() public method

Set the data that will be used by a view composer
public setData ( array $data ) : array
$data array
return array