src/Common/CodeIgniter/Core/Router.php
protected function _validate_request($segments)
    {
        if (count($segments) == 0) {
            return $segments;
        }

        /* locate module controller */
        if ($located = $this->locate($segments)) {
            return $located;
        }

        /* use a default 404_override controller */
        if (isset($this->routes['404_override']) && $this->routes['404_override']) {
            $segments = explode('/', $this->routes['404_override']);

            if ($located = $this->locate($segments)) {
                return $located;
            }
        }

        /* no controller found */
        show404('', true);
    }
protected function _validate_request($segments)
    {
        if (count($segments) == 0) {
            return $segments;
        }

        /* locate module controller */
        if ($located = $this->locate($segments)) {
            return $located;
        }

        /* use a default 404_override controller */
        if (isset($this->routes['404_override']) && $this->routes['404_override']) {
            $segments = explode('/', $this->routes['404_override']);

            if ($located = $this->locate($segments)) {
                return $located;
            }
        }

        /* no controller found */
        show404('', true);
    }
protected function _validate_request ( $ segments ) { if ( count ( $ segments ) == 0 ) { return $ segments ; } /* locate module controller */ if ( $ located = $ this -> locate ( $ segments ) ) { return $ located ; } /* use a default 404_override controller */ if ( isset ( $ this -> routes [ '404_override' ] ) && $ this -> routes [ '404_override' ] ) { $ segments = explode ( '/' , $ this -> routes [ '404_override' ] ) ; if ( $ located = $ this -> locate ( $ segments ) ) { return $ located ; } } /* no controller found */ show404 ( '' , true ) ; }
Extending method purely to change the 404 behaviour and PSR-2 things a little.

When show404() is reached it means that a valid controller could not be
found. These errors should be logged, however show404() by default doesn't
log errors, hence the override.

@param array $segments The URI segments

@return array
Extending method purely to change the 404 behaviour and PSR - 2 things a little .