Upstatement / routes

Simple routing for WordPress
188 stars 39 forks source link

Add HTTP methods to router map #26

Open amt925 opened 4 years ago

amt925 commented 4 years ago

This changes the map() method's $args array parameter to a $method string parameter containing a piped string of the 5 HTTP methods (GET|POST|PATCH|PUT|DELETE) to match AltoRouter https://altorouter.com/usage/mapping-routes.html.

The $args parameter did not do anything that I can see which is the reason it was removed.

This may look like a large change but it is mostly PSR-12 formatting.