芝麻web文件管理V1.00
编辑当前文件:/home/mgatv524/www/midiatech/vendor/illuminate/cache/MemcachedConnector.php
getMemcached(); // For each server in the array, we'll just extract the configuration and add // the server to the Memcached connection. Once we have added all of these // servers we'll verify the connection is successful and return it back. foreach ($servers as $server) { $memcached->addServer( $server['host'], $server['port'], $server['weight'] ); } $memcachedStatus = $memcached->getVersion(); if (! is_array($memcachedStatus)) { throw new RuntimeException('No Memcached servers added.'); } if (in_array('255.255.255', $memcachedStatus) && count(array_unique($memcachedStatus)) === 1) { throw new RuntimeException('Could not establish Memcached connection.'); } return $memcached; } /** * Get a new Memcached instance. * * @return \Memcached */ protected function getMemcached() { return new Memcached; } }