public static function setDefaultMode(int $mode) : void
    {
        if (in_array($mode, [self::MODE_REGEX, self::MODE_STRING])) {
            self::$mode = $mode;
            return;
        }

        // Unknown mode
        throw new \UnexpectedValueException('Invalid route mode');
    }
public static function setDefaultMode(int $mode) : void
    {
        if (in_array($mode, [self::MODE_REGEX, self::MODE_STRING])) {
            self::$mode = $mode;
            return;
        }

        // Unknown mode
        throw new \UnexpectedValueException('Invalid route mode');
    }
public static function setDefaultMode ( int $ mode ) : void { if ( in_array ( $ mode , [ self :: MODE_REGEX , self :: MODE_STRING ] ) ) { self :: $ mode = $ mode ; return ; } // Unknown mode throw new \ UnexpectedValueException ( 'Invalid route mode' ) ; }
Set the route parsing mode

@param int $mode a class MODE_* constant

@return void

@throws \UnexpectedValueException for unknown modes
Set the route parsing mode