public function MemcacheMock::get 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::get()
Retrieve item from the server.
Parameters
string|array $key:
int|array $flags:
Return value
mixed
File
- vendor/
symfony/ http-kernel/ Tests/ Profiler/ Mock/ MemcacheMock.php, line 169
Class
- MemcacheMock
- MemcacheMock for simulating Memcache extension in tests.
Namespace
Symfony\Component\HttpKernel\Tests\Profiler\MockCode
public function get($key, &$flags = null) {
if (!$this->connected) {
return false;
}
if (is_array($key)) {
$result = array();
foreach ($key as $k) {
if (isset($this->storage[$k])) {
$result[] = $this
->getData($k);
}
}
return $result;
}
return $this
->getData($key);
}