public function __call($name, $args) { $property = null; $property = $this->__get($name); if (is_callable($property)) { return call_user_func_array($property, $args); } throw new Exception("Uncallable variable `{$name}`."); }