Bluz\Cache\Adapter\Memcached::__construct PHP Method

__construct() public method

Check and setup memcached servers
public __construct ( array $settings = [] )
$settings array
    public function __construct($settings = [])
    {
        // check Memcached extension
        if (!extension_loaded('memcached')) {
            throw new ComponentException("Memcached extension not installed/enabled.\n                Install and/or enable memcached extension. See phpinfo() for more information");
        }
        // check Memcached settings
        if (!is_array($settings) || empty($settings) || !isset($settings['servers'])) {
            throw new ConfigurationException("Memcached configuration is missed. Please check 'cache' configuration section");
        }
        parent::__construct($settings);
    }