phpci/PHPCI/Helper/LoginIsDisabled.php

40 lines
859 B
PHP
Raw Normal View History

<?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;
/**
2015-07-19 20:09:27 +02:00
* Login Is Disabled Helper - Checks if login is disalbed in the view
*
* @author Stephen Ball <phpci@stephen.rebelinblue.com>
* @package PHPCI
* @subpackage Web
*/
class LoginIsDisabled
{
/**
2015-02-26 09:45:42 +01:00
* Checks if
2015-07-19 20:09:27 +02:00
*
* @param $method
* @param array $params
* @return mixed|null
*/
public function __call($method, $params = array())
{
unset($method, $params);
2015-07-19 20:09:27 +02:00
2015-01-22 10:17:58 +01:00
$config = Config::getInstance();
$state = (bool) $config->get('phpci.authentication_settings.state', false);
return (false !== $state);
}
}