Skip to content

Instantly share code, notes, and snippets.

@chadaustin
Created April 26, 2012 08:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save chadaustin/2497372 to your computer and use it in GitHub Desktop.
Save chadaustin/2497372 to your computer and use it in GitHub Desktop.
<?
namespace unicorns;
class module {
private $helper;
public function __get($name) {
if (!$this->helper) {
$this->helper = new PHPFuncHelper();
}
return $this->helper;
}
public function __isset($name) {
return ($name != 'Module');
}
}
class PHPFuncHelper {
function __call($name, $args) {
return call_user_func_array($name, $args);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment