SetOperation
in package
implements
FieldOperation
Class SetOperation - Operation to set a value for an object key.
Tags
Interfaces, Classes and Traits
- FieldOperation
- Class FieldOperation - Interface for all Parse Field Operations.
Table of Contents
- $isAssociativeArray : bool
- If the value should be forced as object.
- $value : mixed
- Value to set for this operation.
- __construct() : mixed
- Create a SetOperation with a value.
- _apply() : mixed
- Apply the current operation and return the result.
- _encode() : mixed
- Returns an associative array encoding of the current operation.
- _mergeWithPrevious() : FieldOperation
- Merge this operation with a previous operation and return the resulting operation.
- getValue() : mixed
- Get the value for this operation.
Properties
$isAssociativeArray
If the value should be forced as object.
private
bool
$isAssociativeArray
$value
Value to set for this operation.
private
mixed
$value
Methods
__construct()
Create a SetOperation with a value.
public
__construct(mixed $value[, bool $isAssociativeArray = false ]) : mixed
Parameters
- $value : mixed
-
Value to set for this operation.
- $isAssociativeArray : bool = false
-
If the value should be forced as object.
Return values
mixed —_apply()
Apply the current operation and return the result.
public
_apply(mixed $oldValue, mixed $object, string $key) : mixed
Parameters
- $oldValue : mixed
-
Value prior to this operation.
- $object : mixed
-
Value for this operation.
- $key : string
-
Key to set this value on.
Return values
mixed —_encode()
Returns an associative array encoding of the current operation.
public
_encode() : mixed
Return values
mixed —_mergeWithPrevious()
Merge this operation with a previous operation and return the resulting operation.
public
_mergeWithPrevious(FieldOperation $previous) : FieldOperation
Parameters
- $previous : FieldOperation
-
Previous operation.
Return values
FieldOperation —getValue()
Get the value for this operation.
public
getValue() : mixed
Return values
mixed —Value.