Created
April 26, 2012 08:06
-
-
Save chadaustin/2497372 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<? | |
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