chriso/klein.php — pull request #162 by Rican7 (2013-12-19 18:25:42+00:00)
Title: Bugfix - Named routes ordering

This PR is a fix for the unexpected behavior of Klein which caused it to re-order the defined routes in its collection when any of them were named.

I was trying to be slick in my previous implementation, hoping that it would improve performance, but it caused the ordering bug. This new fix implements the `prepareNamed()` method on the `RouteCollection` class in a more basic way, but actually doesn't harm performance because of the way that PHP handles Object instance referencing in arrays. Woot!

This PR fixes #160