MongoHybrid\Client::hdel PHP Метод

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

Delete one or more hash fields
public hdel ( string $key ) : integer
$key string
Результат integer
    public function hdel($key)
    {
        $set = $this->getKey($collection, $key, []);
        if (!count($set)) {
            return 0;
        }
        $fields = func_get_args();
        $removed = 0;
        for ($i = 1; $i < count($fields); $i++) {
            $field = $fields[$i];
            if (isset($set[$field])) {
                unset($set[$field]);
                $removed++;
            }
        }
        $this->setKey($collection, $key, $set);
        return $removed;
    }