SetOperation

Implements \Parse\Internal\FieldOperation

Class SetOperation - Operation to set a value for an object key.

author

Fosco Marotto fjm@fb.com

package

Parse\Internal

Methods

Create a SetOperation with a value.

__construct(mixed $value, boolean $isAssociativeArray = false) 

Arguments

$value

mixed

Value to set for this operation.

$isAssociativeArray

boolean

If the value should be forced as object.

Apply the current operation and return the result.

_apply(mixed $oldValue, mixed $object, string $key) : mixed

Arguments

$oldValue

mixed

Value prior to this operation.

$object

mixed

Value for this operation.

$key

string

Key to set this value on.

Response

mixed

Returns an associative array encoding of the current operation.

_encode() : mixed

Response

mixed

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

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

Arguments

$previous

\Parse\Internal\FieldOperation

Previous operation.

Response

\Parse\Internal\FieldOperation

Get the value for this operation.

getValue() : mixed

Response

mixed

Value.

Properties

Value to set for this operation.

value : mixed
var

Type(s)

mixed

If the value should be forced as object.

isAssociativeArray : boolean
var

Type(s)

boolean