You are here

public function RedisMock::setex 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::setex()

Store data at the server with expiration time.

Parameters

string $key:

int $ttl:

mixed $value:

Return value

bool

File

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

Class

RedisMock
RedisMock for simulating Redis extension in tests.

Namespace

Symfony\Component\HttpKernel\Tests\Profiler\Mock

Code

public function setex($key, $ttl, $value) {
  if (!$this->connected) {
    return false;
  }
  $this
    ->storeData($key, $value);
  return true;
}