Пример #1
0
 /**
  * Load captcha class
  *
  * @return void
  */
 private function iniViewCaptcha()
 {
     $captchaSessionName = implode('-', url::getSegments());
     $captcha = captcha::load();
     \lib\session::set($captchaSessionName, $captcha->code);
     $captcha->create();
 }
Пример #2
0
 /**
  * Build controller executable path
  * Everide with rerouts
  * Add flat parameters to ignore list
  * Set default/home controller
  * Enable chaining method
  * 
  * @return bootstrap instance
  */
 private function buildRouteController()
 {
     $urlSegments = array_slice(url::getSegments(), $this->urlDepth);
     $route = $this->flatUrlIdentifyController($urlSegments);
     $values = $this->flatUrlIdentifyValues($route, $urlSegments);
     $parameters = $this->flatUrlBindParameters($route, $values, $urlSegments);
     self::$routeController = $route;
     if (empty(self::$routeController)) {
         self::$routeController = $urlSegments;
     }
     $this->addToRequest($parameters)->setRemap()->setRouteDefault($urlSegments);
     return $this;
 }