lithium\template\View::_process PHP Method

_process() protected method

Converts a process name to an array containing the rendering steps to be executed for each process.
protected _process ( string $process, array &$params ) : array
$process string A named set of rendering steps.
$params array
return array A 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.
    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;
    }