예제 #1
0
 /**
  * Initializing router
  *
  * @return mixed
  */
 public function init()
 {
     $controller = String::upperFirst(strtolower(Request::get('controller')));
     $action = String::lower(Request::get('action')) . 'Action';
     $controllerData = ClassHandler::loadController($controller, $action);
     $controller = new $controllerData['controller']();
     if (method_exists($controller, 'init')) {
         call_user_func(array($controller, 'init'));
     }
     return call_user_func(array($controller, $controllerData['action']));
 }
예제 #2
0
 /**
  *
  */
 public function testUpperFirst()
 {
     $this->assertEquals('ABc', String::upperFirst('aBc'));
 }