Commit Graph

31 Commits

Author SHA1 Message Date
PJ Dietz 13e683225d Fix PhpDoc errors 2015-02-22 14:44:20 -05:00
PJ Dietz a5c180dace Code inspection 2015-02-22 14:10:15 -05:00
PJ Dietz 812012bdbf Propagate $request and $args to route and errorHandler callables 2015-02-22 12:01:21 -05:00
PJ Dietz 5dacb232ec Updates to Router
- Add Router::add method
- Refactor Router to contain one RouteTable
2015-02-21 14:11:53 -05:00
PJ Dietz 56cf56c6c5 Fix typo 2015-02-20 07:45:48 -05:00
PJ Dietz 3d68a0af86 Add RouteFactory 2015-02-20 07:45:39 -05:00
PJ Dietz 4deac492dd Update BaseRoute to use HandlerUnpacker 2015-02-19 19:59:33 -05:00
PJ Dietz c38659a310 Update TemplateRoute tests 2015-02-18 21:39:07 -05:00
PJ Dietz 6859bd9707 Update RegexRoute tests 2015-02-18 21:21:56 -05:00
PJ Dietz 63fd00fff0 Update PrefixRoute tests 2015-02-18 20:47:45 -05:00
PJ Dietz 38aaf26943 Update StaticRoute tests to use Prophecy 2015-02-18 20:47:00 -05:00
PJ Dietz 9498542f30 Allow Route target to be a callable, string, or instance 2015-02-18 20:17:09 -05:00
PJ Dietz 38639d9ee4 Update TemplateRouter to better match templates with variables in more complicated paths 2015-02-02 17:08:25 -05:00
PJ Dietz ca2c8625ec Store PrefixRoutes to a separate array.
Prioritize routes in the order static, prefix, everything else.
2015-01-02 13:13:08 -05:00
PJ Dietz caef817535 Do not allow routing to continue after a dispatched StaticRoute returns null 2015-01-02 12:31:02 -05:00
PJ Dietz 78fe57d736 Store StaticRoutes to separate hash array in Router
Add StaticRouteInterface
2015-01-02 12:00:30 -05:00
Phil b0c1330a26 Optimized for static routes 2015-01-01 19:44:33 +00:00
PJ Dietz 6d499a6643 Add PrefixRoute 2014-12-29 13:09:51 -05:00
PJ Dietz 7d3f4442b4 Code style 2014-07-27 16:52:59 -04:00
PJ Dietz d1a77c5454 Allow * wildcard at end of URI template 2014-07-27 16:37:24 -04:00
PJ Dietz 6a642dfed2 Fix documentation and add tests for BaseRoute 2014-07-13 17:18:08 -04:00
PJ Dietz e597926634 Fix documentation and add tests for TemplateRoute 2014-07-13 17:08:15 -04:00
PJ Dietz f11c13c1b3 Fix documentation and add tests for RegexRoute 2014-07-13 16:27:09 -04:00
PJ Dietz 921d84cf8b Update StaticRoute documentation and add tests 2014-07-13 15:50:30 -04:00
PJ Dietz 18d3d6c9db Update RouteBuilder docs and add test
- Remove RouteBuilder::buildRoutesFromJson()
- Allow RouteBuilder::buildRoutes() to parse JSON
- Add PHPUnit
- Add tests for RouteBuidler
- Update docs for RouteBuilder
- Update README RouteBuilder example
- Rename constant in BaseRoute
2014-07-13 14:29:37 -04:00
PJ Dietz c61b2197ea Remove @package tag from phpdoc throughout. 2014-07-13 09:00:38 -04:00
PJ Dietz aa06181e40 Refactor DispatcherInterface to HandlerInterface
Update file doc blocks
Code inspection
2014-06-29 10:43:39 -04:00
PJ Dietz 3718e03c78 Add RouteBuilder class for parsing route configurations 2014-06-29 02:11:52 -04:00
PJ Dietz 12b971dfe6 Add convenience methods to Router
Code cleanup and inspection
2014-06-28 20:12:55 -04:00
PJ Dietz 8f99b88d09 Reduce number of interfaces and classes
Remove RouterInterface, Route, and RouteTarget
Change signature of DispatcherInterface::getResponse() to include args
Update classes to match new DispatcherInterface::getResponse()

This update simplifies the API significantly with most classes now
simply needing to implement DispatcherInterface
2014-06-28 19:42:05 -04:00
PJ Dietz 618058850d Add Route classes
Route is now replaced with several classes descending from BaseRoute.
Each of these routes takes care of autoloading and instantiated the
RouteTargetInterface instead of leaving that to the Router.
2014-06-28 18:44:09 -04:00