public function setup($config)
{
if (class_exists('Memcache')) {
$this->connection = new \Memcache();
} else {
if (class_exists('Memcached')) {
$this->connection = new \Memcached();
} else {
throw new \Exception('The module memcache or memcached is not activated in your PHP environment.');
}
}
foreach ($this->config['servers'] as $server) {
$this->connection->addServer($server['ip'], $server['port'] + 0);
}
}