silverstripe-environmentcheck/code/DevHealthController.php

26 lines
432 B
PHP
Raw Normal View History

<?php
class DevHealthController extends Controller {
2015-09-10 23:13:48 +02:00
/**
* @var array
*/
2013-06-21 05:36:45 +02:00
public static $allowed_actions = array(
'index'
);
2015-09-10 23:13:48 +02:00
/**
* @return EnvironmentChecker
*
* @throws SS_HTTPResponse_Exception
*/
function index() {
2015-09-10 23:13:48 +02:00
// health check does not require permission to run
$checker = new EnvironmentChecker('health', 'Site health');
$checker->init('');
$checker->setErrorCode(404);
return $checker;
}
}