public function __call($method, $args) { if (isset($this->functions[$method])) { call_user_func_array($this->functions[$method], $args); } else { // error out } }