2014-12-11 15:41:00 +01:00
|
|
|
<?php
|
|
|
|
/**
|
|
|
|
* PHPCI - Continuous Integration for PHP
|
|
|
|
*
|
|
|
|
* @copyright Copyright 2014, Block 8 Limited.
|
|
|
|
* @license https://github.com/Block8/PHPCI/blob/master/LICENSE.md
|
|
|
|
* @link https://www.phptesting.org/
|
|
|
|
*/
|
|
|
|
|
|
|
|
namespace PHPCI\Helper;
|
|
|
|
|
2015-01-22 10:17:58 +01:00
|
|
|
use b8\Config;
|
|
|
|
|
2014-12-11 15:41:00 +01:00
|
|
|
/**
|
2015-06-25 16:21:23 +02:00
|
|
|
* Login Is Disabled Helper - Checks if login is disabled in the view
|
2014-12-11 15:41:00 +01:00
|
|
|
* @author Stephen Ball <phpci@stephen.rebelinblue.com>
|
|
|
|
* @package PHPCI
|
|
|
|
* @subpackage Web
|
|
|
|
*/
|
|
|
|
class LoginIsDisabled
|
|
|
|
{
|
|
|
|
/**
|
2015-02-26 09:45:42 +01:00
|
|
|
* Checks if
|
2014-12-11 15:41:00 +01:00
|
|
|
* @param $method
|
|
|
|
* @param array $params
|
|
|
|
* @return mixed|null
|
|
|
|
*/
|
|
|
|
public function __call($method, $params = array())
|
|
|
|
{
|
|
|
|
unset($method, $params);
|
|
|
|
|
2015-01-22 10:17:58 +01:00
|
|
|
$config = Config::getInstance();
|
2014-12-11 15:41:00 +01:00
|
|
|
$state = (bool) $config->get('phpci.authentication_settings.state', false);
|
|
|
|
|
|
|
|
return (false !== $state);
|
|
|
|
}
|
|
|
|
}
|