public function MemcachedMock::replace in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/symfony/http-kernel/Tests/Profiler/Mock/MemcachedMock.php \Symfony\Component\HttpKernel\Tests\Profiler\Mock\MemcachedMock::replace()
Replace value of the existing item.
Parameters
string $key:
mixed $value:
int $expiration:
Return value
bool
File
- vendor/
symfony/ http-kernel/ Tests/ Profiler/ Mock/ MemcachedMock.php, line 110
Class
- MemcachedMock
- MemcachedMock for simulating Memcached extension in tests.
Namespace
Symfony\Component\HttpKernel\Tests\Profiler\MockCode
public function replace($key, $value, $expiration = null) {
if (!$this->connected) {
return false;
}
if (isset($this->storage[$key])) {
$this
->storeData($key, $value);
return true;
}
return false;
}