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;
    }