Routing Change Log

v0.2.2

  • Added a workaround to prevent static routes from being matched to variable components.
  • Changed the behavior of the "nomatch" argument. It now accepts static component names as keywords where the value of this key indicates their position of appearance in the URL. For example, a nomatch of array("articles" => 0) would indicate that any appearance of articles at the first path component in the request URI (such as /articles if the application lives at the root or /my/path/articles if the application lives under /my/path) should not consider the route a match.
  • Fixed NOTICE warnings from non-objects being referenced incorrectly.
  • Fixed an issue where non-existent routes and controllers were generating more E_NOTICE warnings.
  • Removed unused variables and cleaned up some code.
  • Fixed empty array offset notices when the route passed to Routing is null when using array argument mappings as opposed to traditional function calls.
  • _doCall() better accommodates RESTful routing, but you'll need to use a hidden form element _method to work around the fact that most browsers only support GET and POST. For example, the following can be used to indicate what method Routing should use (Routing will automatically examine the contents of $_POST for _method:
    <form method="post" action="/path/to/my/request">
    <!-- do something -->
    <input type="hidden" name="_method" value="put" />
    </form>