Parse PHP SDK API Reference

RemoveOperation
in package
implements FieldOperation

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

Tags
author

Fosco Marotto [email protected]

Interfaces, Classes and Traits

FieldOperation
Class FieldOperation - Interface for all Parse Field Operations.

Table of Contents

$objects  : array<string|int, mixed>
Array with objects to remove.
__construct()  : mixed
Creates an RemoveOperation with the provided objects.
_apply()  : array<string|int, mixed>
Applies current operation, returns resulting value.
_encode()  : array<string|int, mixed>
Returns associative array representing encoded operation.
_mergeWithPrevious()  : FieldOperation
Takes a previous operation and returns a merged operation to replace it.
getValue()  : mixed
Gets the objects for this operation.

Properties

$objects

Array with objects to remove.

private array<string|int, mixed> $objects

Methods

__construct()

Creates an RemoveOperation with the provided objects.

public __construct(array<string|int, mixed> $objects) : mixed
Parameters
$objects : array<string|int, mixed>

Objects to remove.

Tags
throws
ParseException
Return values
mixed

_apply()

Applies current operation, returns resulting value.

public _apply(mixed $oldValue, mixed $obj, string $key) : array<string|int, mixed>
Parameters
$oldValue : mixed

Value prior to this operation.

$obj : mixed

Value being applied.

$key : string

Key this operation affects.

Return values
array<string|int, mixed>

_encode()

Returns associative array representing encoded operation.

public _encode() : array<string|int, mixed>
Return values
array<string|int, mixed>

getValue()

Gets the objects for this operation.

public getValue() : mixed
Return values
mixed

Search results