You are here

public function RedisMock::append in Zircon Profile 8.0

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

Append data to an existing item.

Parameters

string $key:

string $value:

Return value

int Size of the value after the append.

File

vendor/symfony/http-kernel/Tests/Profiler/Mock/RedisMock.php, line 142

Class

RedisMock
RedisMock for simulating Redis 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 strlen($this->storage[$key]);
  }
  return false;
}