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