You are here

public function MemcacheMock::connect in Zircon Profile 8.0

Same name and namespace in other branches
  1. 8 vendor/symfony/http-kernel/Tests/Profiler/Mock/MemcacheMock.php \Symfony\Component\HttpKernel\Tests\Profiler\Mock\MemcacheMock::connect()

Open memcached server connection.

Parameters

string $host:

int $port:

int $timeout:

Return value

bool

File

vendor/symfony/http-kernel/Tests/Profiler/Mock/MemcacheMock.php, line 33

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;
}