IncrementOperation

Implements \Parse\Internal\FieldOperation

Class IncrementOperation - Operation to increment numeric object key.

author

Fosco Marotto fjm@fb.com

package

Parse\Internal

Methods

Creates an IncrementOperation object.

__construct(integer $value = 1) 

Arguments

$value

integer

Amount to increment by.

Apply the current operation and return the result.

_apply(mixed $oldValue, mixed $object, string $key) : integer
Throws
\Parse\ParseException

Arguments

$oldValue

mixed

Value prior to this operation.

$object

mixed

Value for this operation.

$key

string

Key to set Value on.

Response

integer

New value after application.

Get an associative array encoding for this operation.

_encode() : array

Response

array

Merge this operation with a previous operation and return the resulting operation.

_mergeWithPrevious(\Parse\Internal\FieldOperation $previous) : \Parse\Internal\FieldOperation
Throws
\Parse\ParseException

Arguments

$previous

\Parse\Internal\FieldOperation

Previous Operation.

Response

\Parse\Internal\FieldOperation

Get the value for this operation.

getValue() : integer

Response

integer

Properties

Amount to increment by.

value : integer
var

Type(s)

integer