function _verifyIsBannedRoute($currentRoute)
    {
        $r = false;

        $currentRoute = rtrim($currentRoute, '/');
        foreach ($this->routesDenied as $deniedRoute) {
            $deniedRoute = rtrim($deniedRoute, '/');
            $allowLeft = false;
            if (substr($deniedRoute, -1) == '*') {
                // remove star
                $allowLeft = true;
                $deniedRoute = substr($deniedRoute, 0, strlen($deniedRoute) -1 );
            }

            if ( ($left = str_replace($deniedRoute, '', $currentRoute)) !== $currentRoute ) {
                if ($allowLeft || $left == '')
                    return true;
            }
        }

        return $r;
    }
function _verifyIsBannedRoute($currentRoute)
    {
        $r = false;

        $currentRoute = rtrim($currentRoute, '/');
        foreach ($this->routesDenied as $deniedRoute) {
            $deniedRoute = rtrim($deniedRoute, '/');
            $allowLeft = false;
            if (substr($deniedRoute, -1) == '*') {
                // remove star
                $allowLeft = true;
                $deniedRoute = substr($deniedRoute, 0, strlen($deniedRoute) -1 );
            }

            if ( ($left = str_replace($deniedRoute, '', $currentRoute)) !== $currentRoute ) {
                if ($allowLeft || $left == '')
                    return true;
            }
        }

        return $r;
    }
function _verifyIsBannedRoute ( $ currentRoute ) { $ r = false ; $ currentRoute = rtrim ( $ currentRoute , '/' ) ; foreach ( $ this -> routesDenied as $ deniedRoute ) { $ deniedRoute = rtrim ( $ deniedRoute , '/' ) ; $ allowLeft = false ; if ( substr ( $ deniedRoute , - 1 ) == '*' ) { // remove star $ allowLeft = true ; $ deniedRoute = substr ( $ deniedRoute , 0 , strlen ( $ deniedRoute ) - 1 ) ; } if ( ( $ left = str_replace ( $ deniedRoute , '' , $ currentRoute ) ) !== $ currentRoute ) { if ( $ allowLeft || $ left == '' ) return true ; } } return $ r ; }
Check given route name is in banned list

@param string $currentRoute

@return bool
Check given route name is in banned list