Documentation

Operation

Class that represents a JSON Patch operation. It utilizes the JSON pointer syntax, in line with RFC 6902.

Tags
see
http://tools.ietf.org/html/rfc6901

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
see
http://tools.ietf.org/html/rfc6902#section-4

Methods

getPath()

public getPath() : string
Return values
string

getType()

public getType() : string
Return values
string

getValue()

public getValue() : mixed
Return values
mixed

setPath()

public setPath( $path) : mixed
Parameters
$path :
Return values
mixed

setSchema()

public setSchema(Schema $schema) : mixed
Parameters
$schema : Schema
Return values
mixed

setType()

public setType( $type) : mixed
Parameters
$type :

string

Return values
mixed

setValue()

public setValue( $value) : mixed
Parameters
$value :
Return values
mixed

validate()

Validates that this operation is of an allowed type

public validate() : mixed
Tags
throws
RuntimeException

if not

Return values
mixed

Search results