Exemple #1
0
 /**
  * @param $routeAction
  * @param null $args
  * @return mixed
  * @throws \Exception
  */
 protected function callControllerFunction($routeAction, $args = null)
 {
     list($controller, $function) = explode('@', $routeAction);
     $instance = DI::getInstanceOf($controller);
     if (!empty($args)) {
         return call_user_func_array(array($instance, $function), $args);
     }
     return $instance->{$function}();
 }