Phalcon\Db\Adapter\MongoDB\UpdateResult::getUpsertedCount PHP Method

getUpsertedCount() public method

This method should only be called if the write was acknowledged.
See also: UpdateResult::isAcknowledged()
public getUpsertedCount ( ) : integer
return integer
    public function getUpsertedCount()
    {
        if ($this->isAcknowledged) {
            return $this->writeResult->getUpsertedCount();
        }
        throw BadMethodCallException::unacknowledgedWriteResultAccess(__METHOD__);
    }