public function getRouter()
    {
        if (is_null($this->router)) {
            if (method_exists($this, 'resolve')) {
                $this->setRouter($this->resolve(Router::class));
            } else {
                $this->setRouter(new Router());
            }
        }

        return $this->router;
    }
public function getRouter()
    {
        if (is_null($this->router)) {
            if (method_exists($this, 'resolve')) {
                $this->setRouter($this->resolve(Router::class));
            } else {
                $this->setRouter(new Router());
            }
        }

        return $this->router;
    }
public function getRouter ( ) { if ( is_null ( $ this -> router ) ) { if ( method_exists ( $ this , 'resolve' ) ) { $ this -> setRouter ( $ this -> resolve ( Router :: class ) ) ; } else { $ this -> setRouter ( new Router ( ) ) ; } } return $ this -> router ; }
Returns a router object

@return RouterTrait
Returns a router object