public function getRoute(): ?RouteInterface
    {
        if (!is_null($this->getApp())) {
            return $this->getApp()->getService('routing')->getCurrentRoute();
        }

        return null;
    }
public function getRoute(): ?RouteInterface
    {
        if (!is_null($this->getApp())) {
            return $this->getApp()->getService('routing')->getCurrentRoute();
        }

        return null;
    }
public function getRoute ( ) : ? RouteInterface { if ( ! is_null ( $ this -> getApp ( ) ) ) { return $ this -> getApp ( ) -> getService ( 'routing' ) -> getCurrentRoute ( ) ; } return null ; }
Get the Route object of the current path.

@return \Berlioz\Core\Services\Routing\RouteInterface|null
@throws \Berlioz\Core\Exception\RuntimeException if application not accessible
Get the Route object of the current path .