public function setRequestMethods(array $requestMethods) {

	    $requestMethods = array_map('strtoupper', $requestMethods);

        $allowedMethods	= ['GET', 'POST', 'PUT', 'DELETE', 'PATCH'];

        foreach($requestMethods as $requestMethod) {
			if(!in_array($requestMethod, $allowedMethods)) {
				throw new \InvalidArgumentException(sprintf("Invalid request method '%s'.", $requestMethod));
			}
		}

		$this->requestMethods = $requestMethods;
		return $this;

	}
public function setRequestMethods(array $requestMethods) {

	    $requestMethods = array_map('strtoupper', $requestMethods);

        $allowedMethods	= ['GET', 'POST', 'PUT', 'DELETE', 'PATCH'];

        foreach($requestMethods as $requestMethod) {
			if(!in_array($requestMethod, $allowedMethods)) {
				throw new \InvalidArgumentException(sprintf("Invalid request method '%s'.", $requestMethod));
			}
		}

		$this->requestMethods = $requestMethods;
		return $this;

	}
public function setRequestMethods ( array $ requestMethods ) { $ requestMethods = array_map ( 'strtoupper' , $ requestMethods ) ; $ allowedMethods = [ 'GET' , 'POST' , 'PUT' , 'DELETE' , 'PATCH' ] ; foreach ( $ requestMethods as $ requestMethod ) { if ( ! in_array ( $ requestMethod , $ allowedMethods ) ) { throw new \ InvalidArgumentException ( sprintf ( "Invalid request method '%s'." , $ requestMethod ) ) ; } } $ this -> requestMethods = $ requestMethods ; return $ this ; }
set all allowed request methods for a route

@param array $requestMethods
@return \vxPHP\Routing\Route
set all allowed request methods for a route