Mapper::here PHP Method

here() public static method

public static here ( )
    public static function here()
    {
        $self = self::instance();
        if (is_null($self->here)) {
            if (array_key_exists('REQUEST_URI', $_SERVER)) {
                $start = strlen(self::base());
                $request_uri = substr($_SERVER['REQUEST_URI'], $start);
                $self->here = self::normalize($request_uri);
            } else {
                $self->here = '/';
            }
        }
        return $self->here;
    }

Usage Example

 public function check()
 {
     if (!$this->authorized()) {
         $this->auth->setAction(Mapper::here());
         $this->auth->error($this->auth->authError);
         $this->controller->redirect($this->auth->loginAction);
         return false;
     }
     return true;
 }
All Usage Examples Of Mapper::here