checks if request method equals given method

@param   string  $method
@return  bool
493769
public function methodEquals(string $method = null): bool
    {
        if (empty($method)) {
            return true;
        }

        return $this->method === $method;
    }
1372792
public function isValidMethod($method)
    {
        $reflection = $this->getReflection()->getMethod($method);

        return ! $reflection->isAbstract()
                && $reflection->isPublic()
                && preg_match($this->methodRule, $method) > 0;
    }
990559
private function isHttpMethodFiltered($method): bool
    {
        $method = strtoupper($method);
        if ($this->getSecured && $method == "GET") {
            return true;
        } elseif ($this->postSecured && $method == "POST") {
            return true;
        } elseif ($this->putSecured && $method == "PUT") {
            return true;
        } elseif ($this->deleteSecured && $method == "DELETE") {
            return true;
        }
        return false;
    }
1286549
public function withMethod($method): RequestInterface
    {
        $method = $this->filterMethod($method);

        $clone = clone $this;
        $clone->originalMethod = $method;
        $clone->method = null;

        return $clone;
    }
167078
public function checkMethod ($method)
	{
		
		// Method name
		
		$method	= strtolower ($method);
		
		// Get module class name
		
		$class	= $this->getModuleClass ();
		
		// Get methods
		
		$this->getMethods ();
		
		// Loop through the methods
		
		foreach ($this->methods as $obj)
		{
			
			// If the method names match return TRUE and the method exists in the class
			
			if (strtolower ($obj->get ('name')) == $method && method_exists ($class, $method))
			{
				return TRUE;
			}
			
		}
		
		// Return FALSE
		
		return FALSE;
		
	}
35708
public function equals($compare)
    {
        if ($compare instanceof self) {
            return ($compare->className === $this->className && $compare->methodName === $this->methodName);
        }
        
        return false;
    }
749366
public function withMethod($method)
    {
        $method = strtoupper($method);

        if (false === in_array($method, ['GET', 'HEAD', 'POST', 'PUT', 'OPTIONS', 'DELETE'])) {
            throw new \InvalidArgumentException(
                sprintf('Invalid HTTP method: %s', $method)
            );
        }

        return $this->_clone('method', $method);
    }
7586
private function assertHttpMethod($method) {
        if (!$this->assertString($method)) return false;
        $validHttpMethods = array(
            'GET', 'POST', 'PUT', 'DELETE', 'HEAD', 'OPTIONS', 'TRACE', 'CONNECT', 'PATCH', 'LINK', 'UNLINK'
        );
        if (!in_array($method, $validHttpMethods)) return false;
        return true;
    }
108175
public function matchUrl($method, $url) {
		if ($this->method == $method) {
			if (preg_match('/^' . $this->url . '$/', $url, $matches)) {
				$params = $this->prepareParams($matches);
				$this->execute($params);
				return true;
			}
			return false;
		}
	}
990009
public function matchesMethod($className, $methodName): bool
    {
        $this->initialize();

        $methodIdentifier = strtolower($className . '->' . $methodName);
        if (isset(static::$methodPermissions[$methodIdentifier][$this->getCacheEntryIdentifier()])) {
            return true;
        }

        return false;
    }
1245252
public static function setMethod($method) {

		if(false === is_string($method)) {
  			return trigger_error(sprintf('Argument 1 passed to %s() must be of the type string, "%s" given', __METHOD__, gettype($method)), E_USER_ERROR);
  		}

		$_SERVER['REQUEST_METHOD'] = strtoupper($method);
	}
309537
private function methodAllowsQueryString(string $method): bool
    {
        return (Http::GET === $method || Http::HEAD === $method);
    }
834400
public boolean isMethod(MetaMethod method) {
        return getName().equals(method.getName())
            && getModifiers() == method.getModifiers()
            && getReturnType().equals(method.getReturnType())
            && equal(getParameterTypes(), method.getParameterTypes());
    }
90827
public function hasMethodCall($method)
    {
        foreach ($this->calls as $call) {
            if ($call[0] === $method) {
                return true;
            }
        }

        return false;
    }
993704
protected function configureHTTPMethod($method)
    {
        switch ($method) {
            case self::HTTP_GET:
                break;
            case self::HTTP_POST:
                return $this->addCurlOption(CURLOPT_POST, TRUE);
            default:
                return $this->addCurlOption(CURLOPT_CUSTOMREQUEST, $method);
        }
        return TRUE;
    }
298032
private function validateMethod($method)
    {
        $prefix = substr($method, 0, 3);

        if ($prefix === 'get' || $prefix === 'set' || $prefix === 'has') {
            return lcfirst(substr($method, 3));
        }

        $prefix = substr($prefix, 0, 2);

        if ($prefix === 'is') {
            return lcfirst(substr($method, 2));
        }
    }
108792
public function withMethod($method)
    {
        $this->assertMethod($method);
        
        $request = $this->copy();
        $request->method = $method;
        
        return $request;
    }