Document
in package
Class which represents a JSON Patch document, which represents an array of objects. Each object represents a single operation to be applied to the target JSON document. See RFC 6902 for details.
Tags
Table of Contents
- $operations : array<string|int, mixed>
- addOperation() : mixed
- Add a new JSON operation to the document
- getOperations() : array<string|int, mixed>
- getResponseBody() : string
- Encode all the operations into a flat structure for HTTP transfer
- toString() : string
- Cast this document as a string
- validateOperations() : mixed
- Ensure each operation is valid
Properties
$operations
protected
array<string|int, mixed>
$operations
JSON Patch operations
Methods
addOperation()
Add a new JSON operation to the document
public
addOperation(Operation $operation) : mixed
Parameters
- $operation : Operation
Return values
mixed —getOperations()
public
getOperations() : array<string|int, mixed>
Return values
array<string|int, mixed> —getResponseBody()
Encode all the operations into a flat structure for HTTP transfer
public
getResponseBody() : string
Return values
string —toString()
Cast this document as a string
public
toString() : string
Return values
string —validateOperations()
Ensure each operation is valid
protected
validateOperations() : mixed