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

__construct() public method

Check and setup Redis server
public __construct ( array $settings = [] )
$settings array
    public function __construct($settings = [])
    {
        // check Redis extension
        if (!class_exists('\\Predis\\Client')) {
            throw new ComponentException("Predis library not found. Install Predis library [https://github.com/nrk/predis/wiki]");
        }
        // check Redis settings
        if (!is_array($settings) || empty($settings)) {
            throw new ConfigurationException("Predis configuration is missed. Please check 'cache' configuration section");
        }
        parent::__construct($settings);
    }