function __call($func, $args) { if (preg_match("/^Get/", $func)) { $func = substr($func, 3); return $this->__get($func); } else { return parent::__call($func, $args); } }
function __construct($name, WaxBlock $parent_block = NULL) { parent::__construct(); $this->block = $parent_block; $this->name = $name; }
function __call($func, $args) { // if it's a GetVarname() type method, strip out the Get part if (preg_match("/^Get/", $func)) { $var = strtolower(substr($func, 3)); if (isset($this->data[$var]) && !empty($this->data[$var])) { return $this->data[$var]; } else { if (isset($this->aliases[$var])) { return $this->aliases[$var]; } } } else { return parent::__call($func, $args); } }