public function handleInternal(string $path, string $message = null)
    {
        $route = $this->internalRoutes[$path]
            ?? $this->internalRoutes[null]
            ?? null;

        if (!$route) {
            throw new NotFoundException("No internal route to handle: " . $path);
        }

        $this->errorMessage = $message;
        if ($message) {
            $route->setArguments([$message]);
        }

        $route->setMatchedPath($path);
        $this->lastRoute = $route;
        return $route->handle(null, $this->di);
    }
public function handleInternal(string $path, string $message = null)
    {
        $route = $this->internalRoutes[$path]
            ?? $this->internalRoutes[null]
            ?? null;

        if (!$route) {
            throw new NotFoundException("No internal route to handle: " . $path);
        }

        $this->errorMessage = $message;
        if ($message) {
            $route->setArguments([$message]);
        }

        $route->setMatchedPath($path);
        $this->lastRoute = $route;
        return $route->handle(null, $this->di);
    }
public function handleInternal ( string $ path , string $ message = null ) { $ route = $ this -> internalRoutes [ $ path ] ?? $ this -> internalRoutes [ null ] ?? null ; if ( ! $ route ) { throw new NotFoundException ( "No internal route to handle: " . $ path ) ; } $ this -> errorMessage = $ message ; if ( $ message ) { $ route -> setArguments ( [ $ message ] ) ; } $ route -> setMatchedPath ( $ path ) ; $ this -> lastRoute = $ route ; return $ route -> handle ( null , $ this -> di ) ; }
Handle an internal route, the internal routes are not exposed to the
end user.

@param string $path    for this route.
@param string $message with additional details.

@throws \Anax\Route\Exception\NotFoundException

@return mixed from the route handler.
Handle an internal route the internal routes are not exposed to the end user .