lithium\template\View::_process()
Converts a process name to an array containing the rendering steps to be executed for each process.
Parameters
-
string
$process
A named set of rendering steps.
-
array
$params
Returns
arrayA 2-dimensional array that defines the rendering process. The first dimension is a numerically-indexed array containing each rendering step. The second dimension represents the parameters for each step.
Source
protected function _process($process, &$params) {
$defaults = array('conditions' => null, 'multi' => false);
if (!is_array($process)) {
if (!isset($this->_processes[$process])) {
throw new TemplateException("Undefined rendering process '{$process}'.");
}
$process = $this->_processes[$process];
}
if (is_string(key($process))) {
return $this->_convertSteps($process, $params, $defaults);
}
$result = array();
foreach ($process as $step) {
if (is_array($step)) {
$result[] = $step + $defaults;
continue;
}
if (!isset($this->_steps[$step])) {
throw new TemplateException("Undefined rendering step '{$step}'.");
}
$result[$step] = $this->_steps[$step] + $defaults;
}
return $result;
}