You are here

public function MemcachedMock::append in Zircon Profile 8.0

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

Append data to an existing item.

Parameters

string $key:

string $value:

Return value

bool

File

vendor/symfony/http-kernel/Tests/Profiler/Mock/MemcachedMock.php, line 151

Class

MemcachedMock
MemcachedMock for simulating Memcached extension in tests.

Namespace

Symfony\Component\HttpKernel\Tests\Profiler\Mock

Code

public function append($key, $value) {
  if (!$this->connected) {
    return false;
  }
  if (isset($this->storage[$key])) {
    $this
      ->storeData($key, $this
      ->getData($key) . $value);
    return true;
  }
  return false;
}