예제 #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
 /**
  *
  */
 protected function prepareChars()
 {
     $this->charsToUse .= self::$chars;
     if ($this->useSpecialChars) {
         $this->charsToUse .= self::$specialChars;
     }
     if ($this->useUmlauts) {
         $this->charsToUse .= self::$umlauts;
     }
     if ($this->useLowerCase) {
         $this->charsToUse .= String::lower($this->charsToUse);
     }
     if ($this->useUpperCase) {
         $this->charsToUse .= String::upper($this->charsToUse);
     }
     $charArray = Collection::explode($this->charsToUse, '');
     if (Collection::isValid($charArray)) {
         $this->charArray = array_unique($charArray);
     }
 }
예제 #3
0
 /**
  *
  */
 public function testLowerWithWrongDatatype()
 {
     $this->assertFalse(String::lower(['a', 'b', 'c']));
 }