RemoveOperation

Implements \Parse\Internal\FieldOperation

Class RemoveOperation - FieldOperation for removing object(s) from array fields.

author

Fosco Marotto fjm@fb.com

package

Parse\Internal

Methods

Creates an RemoveOperation with the provided objects.

__construct(array $objects) 
Throws
\Parse\ParseException

Arguments

$objects

array

Objects to remove.

Applies current operation, returns resulting value.

_apply(mixed $oldValue, mixed $obj, string $key) : array

Arguments

$oldValue

mixed

Value prior to this operation.

$obj

mixed

Value being applied.

$key

string

Key this operation affects.

Response

array

Returns associative array representing encoded operation.

_encode() : array

Response

array

Takes a previous operation and returns a merged operation to replace it.

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

Arguments

$previous

\Parse\Internal\FieldOperation

Previous operation.

Response

\Parse\Internal\FieldOperation

Merged operation.

Gets the objects for this operation.

getValue() : mixed

Response

mixed

Properties

Array with objects to remove.

objects : array
var

Type(s)

array