public function methodMatch($methods, $requestMethod, Request $request)
    {
        $match = false;
        if ($requestMethod === null) {
            $requestMethod = ($request->getRequestMethod()) ? $request->getRequestMethod() : 'GET';
        }
        $methods = explode('|', $methods);
        foreach ($methods as $method) {
            if (strcasecmp($requestMethod, $method) === 0) {
                $match = true;
                break;
            } else {
                continue;
            }
        }
        if ($match === true) {
            return true;
        }

        return false;
    }
public function methodMatch($methods, $requestMethod, Request $request)
    {
        $match = false;
        if ($requestMethod === null) {
            $requestMethod = ($request->getRequestMethod()) ? $request->getRequestMethod() : 'GET';
        }
        $methods = explode('|', $methods);
        foreach ($methods as $method) {
            if (strcasecmp($requestMethod, $method) === 0) {
                $match = true;
                break;
            } else {
                continue;
            }
        }
        if ($match === true) {
            return true;
        }

        return false;
    }
public function methodMatch ( $ methods , $ requestMethod , Request $ request ) { $ match = false ; if ( $ requestMethod === null ) { $ requestMethod = ( $ request -> getRequestMethod ( ) ) ? $ request -> getRequestMethod ( ) : 'GET' ; } $ methods = explode ( '|' , $ methods ) ; foreach ( $ methods as $ method ) { if ( strcasecmp ( $ requestMethod , $ method ) === 0 ) { $ match = true ; break ; } else { continue ; } } if ( $ match === true ) { return true ; } return false ; }
Match the request methods.

@param string $methods       router request method
@param string $requestMethod Requested method

@since 2.0.3

@return bool
Match the request methods .