src/Router.php
private function verify_route_method($path_method) {
		$this->request_method = (
			isset($_SERVER['REQUEST_METHOD']) &&
			!empty($_SERVER['REQUEST_METHOD'])
		) ? strtoupper($_SERVER['REQUEST_METHOD']) : 'GET';

		# always allow HEAD
		$methods = is_array($path_method)
			? $methods = array_merge($path_method, ['HEAD'])
			: $methods = [$path_method, 'HEAD'];
		$methods = array_unique($methods);
		foreach ($methods as $method) {
			if (!in_array($method, $this->method_collection))
				$this->method_collection[] = $method;
		}
		if (!in_array($this->request_method, $methods))
			return false;
		return true;
	}
private function verify_route_method($path_method) {
		$this->request_method = (
			isset($_SERVER['REQUEST_METHOD']) &&
			!empty($_SERVER['REQUEST_METHOD'])
		) ? strtoupper($_SERVER['REQUEST_METHOD']) : 'GET';

		# always allow HEAD
		$methods = is_array($path_method)
			? $methods = array_merge($path_method, ['HEAD'])
			: $methods = [$path_method, 'HEAD'];
		$methods = array_unique($methods);
		foreach ($methods as $method) {
			if (!in_array($method, $this->method_collection))
				$this->method_collection[] = $method;
		}
		if (!in_array($this->request_method, $methods))
			return false;
		return true;
	}
private function verify_route_method ( $ path_method ) { $ this -> request_method = ( isset ( $ _SERVER [ 'REQUEST_METHOD' ] ) && ! empty ( $ _SERVER [ 'REQUEST_METHOD' ] ) ) ? strtoupper ( $ _SERVER [ 'REQUEST_METHOD' ] ) : 'GET' ; # always allow HEAD $ methods = is_array ( $ path_method ) ? $ methods = array_merge ( $ path_method , [ 'HEAD' ] ) : $ methods = [ $ path_method , 'HEAD' ] ; $ methods = array_unique ( $ methods ) ; foreach ( $ methods as $ method ) { if ( ! in_array ( $ method , $ this -> method_collection ) ) $ this -> method_collection [ ] = $ method ; } if ( ! in_array ( $ this -> request_method , $ methods ) ) return false ; return true ; }
Verify route method.

This validates route method, i.e. method parameter of
Router::route, collects it into method collection for accurate
abort code on shutdown, and finally matches it against current
request method.
Verify route method .