Source of file DevToolsController.php
Size: 0,954 Bytes - Last Modified: 2021-12-23T10:29:23+00:00
/var/www/docs.ssmods.com/process/src/code/controller/DevToolsController.php
123456789101112131415161718192021222324252627282930313233343536373839404142 | <?php // TODO: somehow add the ability to trigger notice, warning, error, and fatal class DevToolsController extends Controller { private static $url_handlers = array ( '' => 'index', '$Action' => '$Action', ); private static $allowed_actions = array ( 'index', 'triggerUserWarning', 'triggerUserError', 'triggerException', ); public function init(){ parent::init(); $renderer = new DebugView(); $renderer->writeHeader(); $renderer->writeInfo("SilverStripe Development Tools: Logs", Director::absoluteBaseURL()); } public function index() { echo SSViewer::execute_template('DevToolsIndex', null); } public function triggerUserWarning(){ trigger_error('Test trigger_error E_USER_WARNING', E_USER_WARNING); } public function triggerUserError(){ trigger_error('Test trigger_error E_USER_ERROR', E_USER_ERROR); } public function triggerException(){ throw new Exception('Test trigger exception'); } } |