aboutsummaryrefslogtreecommitdiffstats
path: root/tests/controller/ext
diff options
context:
space:
mode:
authorDavid King <imkingdavid@gmail.com>2012-10-19 19:54:19 -0400
committerDavid King <imkingdavid@gmail.com>2012-11-16 16:25:09 -0500
commit06158693c7b846518abfe9d72491fc7376e457f3 (patch)
tree46ce44bfeab4bb9f5275fee8ad8e01df3babaddf /tests/controller/ext
parent65dde648cab316fd0f0715f13d57ef45452398a3 (diff)
downloadforums-06158693c7b846518abfe9d72491fc7376e457f3.tar
forums-06158693c7b846518abfe9d72491fc7376e457f3.tar.gz
forums-06158693c7b846518abfe9d72491fc7376e457f3.tar.bz2
forums-06158693c7b846518abfe9d72491fc7376e457f3.tar.xz
forums-06158693c7b846518abfe9d72491fc7376e457f3.zip
[feature/controller] Implement a front controller
PHPBB3-10864
Diffstat (limited to 'tests/controller/ext')
-rw-r--r--tests/controller/ext/foo/config/routing.yml3
-rw-r--r--tests/controller/ext/foo/config/services.yml3
-rw-r--r--tests/controller/ext/foo/controller.php23
3 files changed, 29 insertions, 0 deletions
diff --git a/tests/controller/ext/foo/config/routing.yml b/tests/controller/ext/foo/config/routing.yml
new file mode 100644
index 0000000000..4799fec37d
--- /dev/null
+++ b/tests/controller/ext/foo/config/routing.yml
@@ -0,0 +1,3 @@
+controller1:
+ pattern: /foo
+ defaults: { _controller: foo.controller:handle }
diff --git a/tests/controller/ext/foo/config/services.yml b/tests/controller/ext/foo/config/services.yml
new file mode 100644
index 0000000000..ce0e18c610
--- /dev/null
+++ b/tests/controller/ext/foo/config/services.yml
@@ -0,0 +1,3 @@
+services:
+ foo.controller:
+ class: phpbb_ext_foo_controller
diff --git a/tests/controller/ext/foo/controller.php b/tests/controller/ext/foo/controller.php
new file mode 100644
index 0000000000..72b8560c20
--- /dev/null
+++ b/tests/controller/ext/foo/controller.php
@@ -0,0 +1,23 @@
+<?php
+
+use Symfony\Component\HttpFoundation\Response;
+
+class phpbb_ext_foo_controller
+{
+ /**
+ * Constructor
+ */
+ public function __construct()
+ {
+ }
+
+ /**
+ * Handle method
+ *
+ * @return null
+ */
+ public function handle()
+ {
+ return new Response('Test', 200);
+ }
+}