Skip to content

Instantly share code, notes, and snippets.

@dragoonis
Created June 12, 2011 22:48
Show Gist options
  • Save dragoonis/1022074 to your computer and use it in GitHub Desktop.
Save dragoonis/1022074 to your computer and use it in GitHub Desktop.
<?php
protected function render($template, array $options = array()) {
$core = array();
$core['charset'] = $this->_response->getCharset();
$core['url'] = $this->_request->getUrl();
$core['uri'] = $this->_request->getUri();
$core['flash'] = $this->_response->getFlashAndClear();
$core['is'] = array(
'ajax' => $this->_request->is('ajax'),
'https' => $this->_request->is('https'),
'post' => $this->_request->is('post'),
'get' => $this->_request->is('get'),
'put' => $this->_request->is('put'),
'delete' => $this->_request->is('delete'),
'head' => $this->_request->is('head'),
'head' => $this->_request->is('head'),
);
$core['files']['css'] = $this->_response->getCSSFiles();
$core['files']['js'] = $this->_response->getJSFiles();
$options['core'] = $core;
$this->_view->render($template, $options);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment