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

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

Increment value by x
public incrKey ( string $collection, string $key, integer $by = 1 ) : integer
$collection string
$key string
$by integer
Результат integer
    public function incrKey($collection, $key, $by = 1)
    {
        $current = $this->getKey($collection, $key, 0);
        $newone = $current + $by;
        $this->setKey($collection, $key, $newone);
        return $newone;
    }