1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-03-14 12:40:13 +01:00
2012-11-19 12:37:20 -05:00

36 lines
744 B
PHP

<?php
use Symfony\Component\HttpFoundation\Response;
class phpbb_ext_foo_bar_controller
{
protected $template;
public function __construct(phpbb_controller_helper $helper, phpbb_template $template)
{
$this->template = $template;
$this->helper = $helper;
}
public function handle()
{
return new Response('foo/bar controller handle() method', 200);
}
public function baz($test)
{
return new Response('Value of "test" URL argument is: ' . $test);
}
public function template()
{
$this->template->assign_var('A_VARIABLE', 'I am a variable');
return $this->helper->render('foo_bar_body.html');
}
public function exception()
{
throw new phpbb_controller_exception('Exception thrown from foo/exception route');
}
}