Snc\RedisBundle\Tests\Profiler\Storage\Mock\RedisMock::del PHP Method

del() public method

Remove specified keys.
public del ( string | array $key ) : integer
$key string | array
return integer
    public function del($key)
    {
        if (!$this->connected) {
            return false;
        }
        if (is_array($key)) {
            $result = 0;
            foreach ($key as $k) {
                if (isset($this->storage[$k])) {
                    unset($this->storage[$k]);
                    ++$result;
                }
            }
            return $result;
        }
        if (isset($this->storage[$key])) {
            unset($this->storage[$key]);
            return 1;
        }
        return 0;
    }