Class RelationOperation
Relation operation
Operation that supports adding and removing objects from Relation
.
-
LeanCloud\Operation\RelationOperation
implements
LeanCloud\Operation\IOperation
Methods summary
public
|
#
__construct( string $key, array $adds, array $removes )
Initialize relation operation
Initialize relation operation
Parameters
- $key
- Field key
- $adds
- The objects to add
- $removes
- The objects to remove
Throws
RuntimeException
|
public
string
|
#
getKey( )
Get key of field the operation applies to.
Get key of field the operation applies to.
Returns
string
|
public
string
|
#
getTargetClassName( )
Get target className of relation
Get target className of relation
Returns
string
|
public
array
|
#
encode( )
Encode to JSON represented operation
Encode to JSON represented operation
Returns
array
Implementation of
|
public
LeanCloud\Relation
|
#
applyOn( LeanCloud\Relation $relation, LeanObject $object = null )
Apply the operation on previous relation
Apply the operation on previous relation
Parameters
- $relation
- Previous relation
- $object
- Parent of relation
Returns
Throws
RuntimeException
Implementation of
|
public
LeanCloud\Operation\IOperation
|
|