Operation
in package
Class that represents a JSON Patch operation. It utilizes the JSON pointer syntax, in line with RFC 6902.
Tags
Table of Contents
- $path : string
- $schema : Schema
- $type : string
- $value : mixed
- $allowedTypes : array<string|int, mixed>
- Allowed operation types
- factory() : Operation
- getPath() : string
- getSchema() : Schema
- getType() : string
- getValue() : mixed
- setPath() : mixed
- setSchema() : mixed
- setType() : mixed
- setValue() : mixed
- validate() : mixed
- Validates that this operation is of an allowed type
Properties
$path
protected
string
$path
The JSON pointer value
$schema
protected
Schema
$schema
The JSON schema this operation is acting on
$type
protected
string
$type
The type of operation
$value
protected
mixed
$value
The value for this JSON property
$allowedTypes
Allowed operation types
private
array<string|int, mixed>
$allowedTypes
= array(OpenCloudImageEnumOperationType::ADD, OpenCloudImageEnumOperationType::REMOVE, OpenCloudImageEnumOperationType::REPLACE, OpenCloudImageEnumOperationType::MOVE, OpenCloudImageEnumOperationType::COPY, OpenCloudImageEnumOperationType::TEST)
Tags
Methods
factory()
public
static factory(Schema $schema, Property $property, string $operationType) : Operation
Parameters
Return values
Operation —getPath()
public
getPath() : string
Return values
string —getSchema()
public
getSchema() : Schema
Return values
Schema —getType()
public
getType() : string
Return values
string —getValue()
public
getValue() : mixed
Return values
mixed —setPath()
public
setPath( $path) : mixed
Parameters
Return values
mixed —setSchema()
public
setSchema(Schema $schema) : mixed
Parameters
- $schema : Schema
Return values
mixed —setType()
public
setType( $type) : mixed
Parameters
Return values
mixed —setValue()
public
setValue( $value) : mixed
Parameters
Return values
mixed —validate()
Validates that this operation is of an allowed type
public
validate() : mixed