2012-01-10 07:28:04 +01:00
|
|
|
<?php
|
|
|
|
|
2012-01-20 18:10:48 +01:00
|
|
|
class DevCheckController 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-04-09 01:39:34 +02:00
|
|
|
/**
|
2015-09-10 23:13:48 +02:00
|
|
|
* Permission code to check for access to this controller.
|
|
|
|
*
|
|
|
|
* @var string
|
2015-04-09 01:39:34 +02:00
|
|
|
*/
|
|
|
|
private static $permission = 'ADMIN';
|
|
|
|
|
2015-09-10 23:13:48 +02:00
|
|
|
/**
|
|
|
|
* @param SS_HTTPRequest $request
|
|
|
|
*
|
|
|
|
* @return EnvironmentChecker
|
|
|
|
*
|
|
|
|
* @throws SS_HTTPResponse_Exception
|
|
|
|
*/
|
2014-08-22 06:08:34 +02:00
|
|
|
function index($request) {
|
2015-09-10 23:13:48 +02:00
|
|
|
$suite = 'check';
|
|
|
|
|
|
|
|
if ($name = $request->param('Suite')) {
|
|
|
|
$suite = $name;
|
|
|
|
}
|
|
|
|
|
|
|
|
$checker = new EnvironmentChecker($suite, 'Environment status');
|
|
|
|
$checker->init($this->config()->permission);
|
|
|
|
|
|
|
|
return $checker;
|
2012-01-10 07:28:04 +01:00
|
|
|
}
|
|
|
|
}
|