public function render($template, $data = array(), array $options = array()) { $this->_context = $options['context'] + $this->_context; $this->_data = (array) $data + $this->_vars; $renderer = new Renderer(); return $renderer->render(file_get_contents($template), $this->_context + $this->_data); }
/** * returns rendered content * * @param string $content input content * @param array $data additional data to be passed into render context * @param array $options an array with additional options * @return string content as given * @filter */ public function get($content, $data = array(), array $options = array()) { $defaults = array('allowed' => true); $options += $defaults; $params = compact('content', 'data', 'options'); return $this->_filter(__METHOD__, $params, function ($self, $params) { $renderer = new Renderer($params['content'], $params['data']); return $renderer->render(); }); }