Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

executable file 51 lines (30 sloc) 0.794 kB
<?php
class Helper {
protected $variables = array();
protected $_action;
/** Set Variables **/
function set($name,$value) {
$this->variables[$name] = $value;
}
/** Display Template **/
function render() {
$backtrace = debug_backtrace();
$function = strtolower($backtrace[1]['function']);
extract($this->variables);
$contents = '';
if (file_exists(ROOT . DS . 'views' . DS . 'helpers' . DS . $function . '.php')) {
$filename = (ROOT . DS . 'views' . DS . 'helpers' . DS . $function . '.php');
if (is_file($filename)) {
ob_start();
include $filename;
$contents = ob_get_contents();
ob_end_clean();
}
}
$this->variables = array();
return $contents;
}
}
function getContent($filename) {
return false;
}
Jump to Line
Something went wrong with that request. Please try again.