public function MemcacheMock::addServer

Add a memcached server to connection pool

Parameters

string $host:

integer $port:

boolean $persistent:

integer $weight:

integer $timeout:

integer $retry_interval:

boolean $status:

callable $failure_callback: ms

Return value

boolean

File

drupal/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Tests/Profiler/Mock/MemcacheMock.php, line 85

Class

MemcacheMock
MemcacheMock for simulating Memcache extension in tests.

Namespace

Symfony\Component\HttpKernel\Tests\Profiler\Mock

Code

public function addServer($host, $port = 11211, $persistent = null, $weight = null, $timeout = null, $retry_interval = null, $status = null, $failure_callback = null, $timeoutms = null) {
  if ('127.0.0.1' == $host && 11211 == $port) {
    $this->connected = true;
    return true;
  }
  return false;
}