protected function _step(array $step, array $params, array &$data, array &$options = array())
{
$step += array('path' => null, 'capture' => null);
$_renderer = $this->_renderer;
$_loader = $this->_loader;
$filters = $this->outputFilters;
$params = compact('step', 'params', 'options') + array('data' => $data + $filters, 'loader' => $_loader, 'renderer' => $_renderer);
$filter = function ($self, $params) {
$template = $params['loader']->template($params['step']['path'], $params['params']);
return $params['renderer']->render($template, $params['data'], $params['options']);
};
$result = $this->_filter(__METHOD__, $params, $filter);
if (is_array($step['capture'])) {
switch (key($step['capture'])) {
case 'context':
$options['context'][current($step['capture'])] = $result;
break;
case 'data':
$data[current($step['capture'])] = $result;
break;
}
}
return $result;
}