public function MemcacheMock::connect

Open memcached server connection

Parameters

string $host:

integer $port:

integer $timeout:

Return value

boolean

File

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

Class

MemcacheMock
MemcacheMock for simulating Memcache extension in tests.

Namespace

Symfony\Component\HttpKernel\Tests\Profiler\Mock

Code

public function connect($host, $port = null, $timeout = null) {
  if ('127.0.0.1' == $host && 11211 == $port) {
    $this->connected = true;
    return true;
  }
  return false;
}