DASPRiD / Dash

Flexible PSR-7 compliant HTTP router
BSD 2-Clause "Simplified" License
29 stars 9 forks source link

`Generic` route doesn't allow custom http methods #12

Closed Ocramius closed 10 years ago

Ocramius commented 10 years ago

https://github.com/DASPRiD/Dash/blob/2271fdbfdb7a627f22cb8cb51223a6ec1a98aeeb/src/Dash/Mvc/Router/Http/Route/Generic.php#L28 disallows usage of custom HTTP methods.

Additionally, there's no real reason for the property to be static.

DASPRiD commented 10 years ago

Exactly, we only allow valid HTTP methods, just like the Request object: https://github.com/zendframework/zf2/blob/9a2f11ce6bfc48e14aad931c550689f9aad33627/library/Zend/Http/Request.php#L137

The reason for the property to be static is very simple. It's not an instance-related property. Thus is does not need to be copied into every single instance.

Ocramius commented 10 years ago

custom http methods are valid http methods though...