Introduce FrontController as the replacement for RootController. api-2
authorRobert Sesek <rsesek@bluestatic.org>
Sun, 31 May 2015 20:23:31 +0000 (16:23 -0400)
committerRobert Sesek <rsesek@bluestatic.org>
Sun, 31 May 2015 20:40:25 +0000 (16:40 -0400)
commit09c49802e246f2fe7e326d2afe3dfb832f43738c
tree39b0f68a44a5bebbcf86b822856fa802228fde99
parentac42824b920b4073ff7c1823779f10a10832edc9
Introduce FrontController as the replacement for RootController.

The FrontController has no delegate, but instead uses Interceptors to allow
middleware to further process the request or to interrupt control flow.

One integral change is that if no Action is found for the Request in the UrlMap,
then no action will be taken by the FrontController. Instead, a
NotFoundInterceptor should be used to send a HTTP 404 response in this event.
15 files changed:
data/controller.php
http/action.php
http/action_controller.php
http/front_controller.php [moved from http/root_controller.php with 69% similarity]
http/interceptor.php [new file with mode: 0644]
http/not_found_interceptor.php [new file with mode: 0644]
http/output_filter.php
http/rest_adapter.php
http/url_map.php
testing/tests/http/action_controller_test.php
testing/tests/http/front_controller_test.php [moved from testing/tests/http/root_controller_test.php with 65% similarity]
testing/tests/http/output_filter_test.php
testing/tests/http/rest_action_test.php
testing/tests/http/rest_adapter_test.php
testing/tests/http/url_map_test.php