PHP Class Rs\Json\Patch\Operations\Add

Inheritance: extends Rs\Json\Patch\Operation
Show file Open project: raphaelstolt/php-jsonpatch Class Usage Examples

Public Methods

Method Description
__construct ( stdClass $operation )
perform ( string $targetDocument ) : string

Protected Methods

Method Description
assertMandatories ( stdClass $operation ) Guard the mandatory operation property

Private Methods

Method Description
getReplacementValue ( ) : mixed Returns the replacement value.

Method Details

__construct() public method

public __construct ( stdClass $operation )
$operation stdClass

assertMandatories() protected method

Guard the mandatory operation property
protected assertMandatories ( stdClass $operation )
$operation stdClass The operation structure.

perform() public method

public perform ( string $targetDocument ) : string
$targetDocument string
return string