NinjaMutex\Tests\Mock\MockMemcached::add PHP Метод

add() публичный Метод

public add ( string $key, mixed $value, integer | null $expiration = null, null &$udf_flags = null ) : boolean
$key string
$value mixed
$expiration integer | null
$udf_flags null
Результат boolean
    public function add($key, $value, $expiration = null, &$udf_flags = null)
    {
        if (!$this->available) {
            return false;
        }
        if (false === $this->get($key)) {
            self::$data[$key] = (string) $value;
            return true;
        }
        return false;
    }