Example #1
0
 public function getFunction($function = NULL, array $args = array())
 {
     $route = Eden_Route_Function::i();
     if (is_null($function)) {
         return $route;
     }
     return $route->callArray($function, $args);
 }
Example #2
0
if(!class_exists('Eden_Route')){class Eden_Route extends Eden_Class{protected static $_instance=NULL;public static function i(){$class=__CLASS__;if(is_null(self::$_instance)){self::$_instance=new $class();}return self::$_instance;}public function getClass($class=NULL,array $args=array()){$route=Eden_Route_Class::i();if(is_null($class)){return $route;}return $route->callArray($class,$args);}public function getFunction($function=NULL,array $args=array()){$route=Eden_Route_Function::i();if(is_null($function)){return $route;}return $route->callArray($function,$args);}public function getMethod($class=NULL,$method=NULL,array $args=array()){$route=Eden_Route_Method::i();if(is_null($class) || is_null($method)){return $route;}return $route->call($class,$method,$args);}}}