silverstripe-framework/tests/php/Control/DirectorTest/TestController.php
Damian Mooyman 0c41a97a8b API Refactor Form request handling into FormRequestHandler
API Add HasRequestHandler interface
API Refactor Link() and url handling behaviour from Controller into RequestHandler
API RequestHandler classes now must define url_segment to have a default Link()
API Clean up redirectBack()
2017-03-10 15:04:33 +13:00

39 lines
789 B
PHP

<?php
namespace SilverStripe\Control\Tests\DirectorTest;
use SilverStripe\Control\Controller;
use SilverStripe\Dev\TestOnly;
class TestController extends Controller implements TestOnly
{
private static $url_segment = 'TestController';
private static $allowed_actions = array(
'returnGetValue',
'returnPostValue',
'returnRequestValue',
'returnCookieValue',
);
public function returnGetValue($request)
{
return $_GET['somekey'];
}
public function returnPostValue($request)
{
return $_POST['somekey'];
}
public function returnRequestValue($request)
{
return $_REQUEST['somekey'];
}
public function returnCookieValue($request)
{
return $_COOKIE['somekey'];
}
}