src/UrlHandlers/NamespaceMappedUrlHandler.php
protected function onNoTargetFound($request, $currentUrlFragment = "")
    {
        if (self::$onTargetNotFoundExecuting) {
            return false;
        }

        self::$onTargetNotFoundExecuting = true;

        // Try generating a response for the url with /index on the end.
        // Note that we don't try /index/. This is very deliberate as we want the default behaviour
        // of the handler to kick in and redirect us to /index/ rather than just outputting it's
        // contents.
        if ($currentUrlFragment[strlen($currentUrlFragment) - 1] != "/") {
            $currentUrlFragment .= "/";
        }

        $currentUrlFragment .= "index";

        $response = $this->generateResponseForRequest($request, $currentUrlFragment);

        self::$onTargetNotFoundExecuting = false;

        return $response;
    }
protected function onNoTargetFound($request, $currentUrlFragment = "")
    {
        if (self::$onTargetNotFoundExecuting) {
            return false;
        }

        self::$onTargetNotFoundExecuting = true;

        // Try generating a response for the url with /index on the end.
        // Note that we don't try /index/. This is very deliberate as we want the default behaviour
        // of the handler to kick in and redirect us to /index/ rather than just outputting it's
        // contents.
        if ($currentUrlFragment[strlen($currentUrlFragment) - 1] != "/") {
            $currentUrlFragment .= "/";
        }

        $currentUrlFragment .= "index";

        $response = $this->generateResponseForRequest($request, $currentUrlFragment);

        self::$onTargetNotFoundExecuting = false;

        return $response;
    }
protected function onNoTargetFound ( $ request , $ currentUrlFragment = "" ) { if ( self :: $ onTargetNotFoundExecuting ) { return false ; } self :: $ onTargetNotFoundExecuting = true ; // Try generating a response for the url with /index on the end. // Note that we don't try /index/. This is very deliberate as we want the default behaviour // of the handler to kick in and redirect us to /index/ rather than just outputting it's // contents. if ( $ currentUrlFragment [ strlen ( $ currentUrlFragment ) - 1 ] != "/" ) { $ currentUrlFragment .= "/" ; } $ currentUrlFragment .= "index" ; $ response = $ this -> generateResponseForRequest ( $ request , $ currentUrlFragment ) ; self :: $ onTargetNotFoundExecuting = false ; return $ response ; }
Override this to provide a default response in the event that no action could be found.

@param \Rhubarb\Crown\Request\Request $request The original request we tried to find a target for.
@param $currentUrlFragment
@return bool|string
Override this to provide a default response in the event that no action could be found .