Documentation

JsonNode
in package
implements ModelInterface, ArrayAccess, JsonSerializable

JsonNode Class Doc Comment

Tags
category

Class

author

OpenAPI Generator team

link
https://openapi-generator.tech
implements

\ArrayAccess<string, mixed>

Interfaces, Classes, Traits and Enums

ModelInterface
Interface abstracting model access.
ArrayAccess
JsonSerializable

Table of Contents

DISCRIMINATOR  = null
NODE_TYPE__ARRAY  = 'ARRAY'
NODE_TYPE_BINARY  = 'BINARY'
NODE_TYPE_BOOLEAN  = 'BOOLEAN'
NODE_TYPE_MISSING  = 'MISSING'
NODE_TYPE_NULL  = 'NULL'
NODE_TYPE_NUMBER  = 'NUMBER'
NODE_TYPE_OBJECT  = 'OBJECT'
NODE_TYPE_POJO  = 'POJO'
NODE_TYPE_STRING  = 'STRING'
$attributeMap  : array<string|int, string>
Array of attributes where the key is the local name, and the value is the original name
$container  : array<string|int, mixed>
Associative array for storing property values
$getters  : array<string|int, string>
Array of attributes to getter functions (for serialization of requests)
$openAPIFormats  : array<string|int, string>
Array of property to format mappings. Used for (de)serialization
$openAPIModelName  : string
The original name of the model.
$openAPINullables  : array<string|int, mixed>
Array of nullable properties. Used for (de)serialization
$openAPINullablesSetToNull  : array<string|int, mixed>
If a nullable field gets set to null, insert it here
$openAPITypes  : array<string|int, string>
Array of property to type mappings. Used for (de)serialization
$setters  : array<string|int, string>
Array of attributes to setter functions (for deserialization of responses)
__construct()  : mixed
Constructor
__toString()  : string
Gets the string presentation of the object
attributeMap()  : array<string|int, mixed>
Array of attributes where the key is the local name, and the value is the original name
getArray()  : bool|null
Gets array
getBigDecimal()  : bool|null
Gets big_decimal
getBigInteger()  : bool|null
Gets big_integer
getBinary()  : bool|null
Gets binary
getBoolean()  : bool|null
Gets boolean
getContainer()  : bool|null
Gets container
getDouble()  : bool|null
Gets double
getEmbeddedValue()  : bool|null
Gets embedded_value
getEmpty()  : bool|null
Gets empty
getFloat()  : bool|null
Gets float
getFloatingPointNumber()  : bool|null
Gets floating_point_number
getInt()  : bool|null
Gets int
getIntegralNumber()  : bool|null
Gets integral_number
getLong()  : bool|null
Gets long
getMissingNode()  : bool|null
Gets missing_node
getModelName()  : string
The original name of the model.
getNodeType()  : string|null
Gets node_type
getNodeTypeAllowableValues()  : array<string|int, string>
Gets allowable values of the enum
getNull()  : bool|null
Gets null
getNumber()  : bool|null
Gets number
getObject()  : bool|null
Gets object
getPojo()  : bool|null
Gets pojo
getShort()  : bool|null
Gets short
getString()  : bool|null
Gets string
getters()  : array<string|int, mixed>
Array of attributes to getter functions (for serialization of requests)
getTextual()  : bool|null
Gets textual
getValueNode()  : bool|null
Gets value_node
isNullable()  : bool
Checks if a property is nullable
isNullableSetToNull()  : bool
Checks if a nullable property is set to null.
jsonSerialize()  : mixed
Serializes the object to a value that can be serialized natively by json_encode().
listInvalidProperties()  : array<string|int, mixed>
Show all the invalid properties with reasons.
offsetExists()  : bool
Returns true if offset exists. False otherwise.
offsetGet()  : mixed|null
Gets offset.
offsetSet()  : void
Sets value based on offset.
offsetUnset()  : void
Unsets offset.
openAPIFormats()  : array<string|int, mixed>
Array of property to format mappings. Used for (de)serialization
openAPITypes()  : array<string|int, mixed>
Array of property to type mappings. Used for (de)serialization
setArray()  : self
Sets array
setBigDecimal()  : self
Sets big_decimal
setBigInteger()  : self
Sets big_integer
setBinary()  : self
Sets binary
setBoolean()  : self
Sets boolean
setContainer()  : self
Sets container
setDouble()  : self
Sets double
setEmbeddedValue()  : self
Sets embedded_value
setEmpty()  : self
Sets empty
setFloat()  : self
Sets float
setFloatingPointNumber()  : self
Sets floating_point_number
setInt()  : self
Sets int
setIntegralNumber()  : self
Sets integral_number
setLong()  : self
Sets long
setMissingNode()  : self
Sets missing_node
setNodeType()  : self
Sets node_type
setNull()  : self
Sets null
setNumber()  : self
Sets number
setObject()  : self
Sets object
setPojo()  : self
Sets pojo
setShort()  : self
Sets short
setString()  : self
Sets string
setters()  : array<string|int, mixed>
Array of attributes to setter functions (for deserialization of responses)
setTextual()  : self
Sets textual
setValueNode()  : self
Sets value_node
toHeaderValue()  : string
Gets a header-safe presentation of the object
valid()  : bool
Validate all the properties in the model return true if all passed
openAPINullables()  : array<string|int, mixed>
Array of nullable properties
getOpenAPINullablesSetToNull()  : array<string|int, bool>
Array of nullable field names deliberately set to null
setIfExists()  : void
Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the $this->openAPINullablesSetToNull array
setOpenAPINullablesSetToNull()  : void
Setter - Array of nullable field names deliberately set to null

Constants

DISCRIMINATOR

public mixed DISCRIMINATOR = null

NODE_TYPE__ARRAY

public mixed NODE_TYPE__ARRAY = 'ARRAY'

NODE_TYPE_BINARY

public mixed NODE_TYPE_BINARY = 'BINARY'

NODE_TYPE_BOOLEAN

public mixed NODE_TYPE_BOOLEAN = 'BOOLEAN'

NODE_TYPE_MISSING

public mixed NODE_TYPE_MISSING = 'MISSING'

NODE_TYPE_NULL

public mixed NODE_TYPE_NULL = 'NULL'

NODE_TYPE_NUMBER

public mixed NODE_TYPE_NUMBER = 'NUMBER'

NODE_TYPE_OBJECT

public mixed NODE_TYPE_OBJECT = 'OBJECT'

NODE_TYPE_POJO

public mixed NODE_TYPE_POJO = 'POJO'

NODE_TYPE_STRING

public mixed NODE_TYPE_STRING = 'STRING'

Properties

$attributeMap

Array of attributes where the key is the local name, and the value is the original name

protected static array<string|int, string> $attributeMap = ['string' => 'string', 'object' => 'object', 'float' => 'float', 'empty' => 'empty', 'array' => 'array', 'null' => 'null', 'container' => 'container', 'textual' => 'textual', 'missing_node' => 'missingNode', 'value_node' => 'valueNode', 'node_type' => 'nodeType', 'pojo' => 'pojo', 'number' => 'number', 'integral_number' => 'integralNumber', 'floating_point_number' => 'floatingPointNumber', 'short' => 'short', 'int' => 'int', 'long' => 'long', 'double' => 'double', 'big_decimal' => 'bigDecimal', 'big_integer' => 'bigInteger', 'boolean' => 'boolean', 'binary' => 'binary', 'embedded_value' => 'embeddedValue']

$container

Associative array for storing property values

protected array<string|int, mixed> $container = []

$getters

Array of attributes to getter functions (for serialization of requests)

protected static array<string|int, string> $getters = ['string' => 'getString', 'object' => 'getObject', 'float' => 'getFloat', 'empty' => 'getEmpty', 'array' => 'getArray', 'null' => 'getNull', 'container' => 'getContainer', 'textual' => 'getTextual', 'missing_node' => 'getMissingNode', 'value_node' => 'getValueNode', 'node_type' => 'getNodeType', 'pojo' => 'getPojo', 'number' => 'getNumber', 'integral_number' => 'getIntegralNumber', 'floating_point_number' => 'getFloatingPointNumber', 'short' => 'getShort', 'int' => 'getInt', 'long' => 'getLong', 'double' => 'getDouble', 'big_decimal' => 'getBigDecimal', 'big_integer' => 'getBigInteger', 'boolean' => 'getBoolean', 'binary' => 'getBinary', 'embedded_value' => 'getEmbeddedValue']

$openAPIFormats

Array of property to format mappings. Used for (de)serialization

protected static array<string|int, string> $openAPIFormats = ['string' => null, 'object' => null, 'float' => null, 'empty' => null, 'array' => null, 'null' => null, 'container' => null, 'textual' => null, 'missing_node' => null, 'value_node' => null, 'node_type' => null, 'pojo' => null, 'number' => null, 'integral_number' => null, 'floating_point_number' => null, 'short' => null, 'int' => null, 'long' => null, 'double' => null, 'big_decimal' => null, 'big_integer' => null, 'boolean' => null, 'binary' => null, 'embedded_value' => null]
Tags
phpstan-var

array<string, string|null>

psalm-var

array<string, string|null>

$openAPIModelName

The original name of the model.

protected static string $openAPIModelName = 'JsonNode'

$openAPINullables

Array of nullable properties. Used for (de)serialization

protected static array<string|int, mixed> $openAPINullables = ['string' => false, 'object' => false, 'float' => false, 'empty' => false, 'array' => false, 'null' => false, 'container' => false, 'textual' => false, 'missing_node' => false, 'value_node' => false, 'node_type' => false, 'pojo' => false, 'number' => false, 'integral_number' => false, 'floating_point_number' => false, 'short' => false, 'int' => false, 'long' => false, 'double' => false, 'big_decimal' => false, 'big_integer' => false, 'boolean' => false, 'binary' => false, 'embedded_value' => false]

$openAPINullablesSetToNull

If a nullable field gets set to null, insert it here

protected array<string|int, mixed> $openAPINullablesSetToNull = []

$openAPITypes

Array of property to type mappings. Used for (de)serialization

protected static array<string|int, string> $openAPITypes = ['string' => 'bool', 'object' => 'bool', 'float' => 'bool', 'empty' => 'bool', 'array' => 'bool', 'null' => 'bool', 'container' => 'bool', 'textual' => 'bool', 'missing_node' => 'bool', 'value_node' => 'bool', 'node_type' => 'string', 'pojo' => 'bool', 'number' => 'bool', 'integral_number' => 'bool', 'floating_point_number' => 'bool', 'short' => 'bool', 'int' => 'bool', 'long' => 'bool', 'double' => 'bool', 'big_decimal' => 'bool', 'big_integer' => 'bool', 'boolean' => 'bool', 'binary' => 'bool', 'embedded_value' => 'bool']

$setters

Array of attributes to setter functions (for deserialization of responses)

protected static array<string|int, string> $setters = ['string' => 'setString', 'object' => 'setObject', 'float' => 'setFloat', 'empty' => 'setEmpty', 'array' => 'setArray', 'null' => 'setNull', 'container' => 'setContainer', 'textual' => 'setTextual', 'missing_node' => 'setMissingNode', 'value_node' => 'setValueNode', 'node_type' => 'setNodeType', 'pojo' => 'setPojo', 'number' => 'setNumber', 'integral_number' => 'setIntegralNumber', 'floating_point_number' => 'setFloatingPointNumber', 'short' => 'setShort', 'int' => 'setInt', 'long' => 'setLong', 'double' => 'setDouble', 'big_decimal' => 'setBigDecimal', 'big_integer' => 'setBigInteger', 'boolean' => 'setBoolean', 'binary' => 'setBinary', 'embedded_value' => 'setEmbeddedValue']

Methods

__construct()

Constructor

public __construct([array<string|int, mixed> $data = null ]) : mixed
Parameters
$data : array<string|int, mixed> = null

Associated array of property values initializing the model

Return values
mixed —

__toString()

Gets the string presentation of the object

public __toString() : string
Return values
string —

attributeMap()

Array of attributes where the key is the local name, and the value is the original name

public static attributeMap() : array<string|int, mixed>
Return values
array<string|int, mixed> —

getArray()

Gets array

public getArray() : bool|null
Return values
bool|null —

getBigDecimal()

Gets big_decimal

public getBigDecimal() : bool|null
Return values
bool|null —

getBigInteger()

Gets big_integer

public getBigInteger() : bool|null
Return values
bool|null —

getBinary()

Gets binary

public getBinary() : bool|null
Return values
bool|null —

getBoolean()

Gets boolean

public getBoolean() : bool|null
Return values
bool|null —

getContainer()

Gets container

public getContainer() : bool|null
Return values
bool|null —

getDouble()

Gets double

public getDouble() : bool|null
Return values
bool|null —

getEmbeddedValue()

Gets embedded_value

public getEmbeddedValue() : bool|null
Return values
bool|null —

getEmpty()

Gets empty

public getEmpty() : bool|null
Return values
bool|null —

getFloat()

Gets float

public getFloat() : bool|null
Return values
bool|null —

getFloatingPointNumber()

Gets floating_point_number

public getFloatingPointNumber() : bool|null
Return values
bool|null —

getInt()

Gets int

public getInt() : bool|null
Return values
bool|null —

getIntegralNumber()

Gets integral_number

public getIntegralNumber() : bool|null
Return values
bool|null —

getLong()

Gets long

public getLong() : bool|null
Return values
bool|null —

getMissingNode()

Gets missing_node

public getMissingNode() : bool|null
Return values
bool|null —

getModelName()

The original name of the model.

public getModelName() : string
Return values
string —

getNodeType()

Gets node_type

public getNodeType() : string|null
Return values
string|null —

getNodeTypeAllowableValues()

Gets allowable values of the enum

public getNodeTypeAllowableValues() : array<string|int, string>
Return values
array<string|int, string> —

getNull()

Gets null

public getNull() : bool|null
Return values
bool|null —

getNumber()

Gets number

public getNumber() : bool|null
Return values
bool|null —

getObject()

Gets object

public getObject() : bool|null
Return values
bool|null —

getPojo()

Gets pojo

public getPojo() : bool|null
Return values
bool|null —

getShort()

Gets short

public getShort() : bool|null
Return values
bool|null —

getString()

Gets string

public getString() : bool|null
Return values
bool|null —

getters()

Array of attributes to getter functions (for serialization of requests)

public static getters() : array<string|int, mixed>
Return values
array<string|int, mixed> —

getTextual()

Gets textual

public getTextual() : bool|null
Tags
deprecated
Return values
bool|null —

getValueNode()

Gets value_node

public getValueNode() : bool|null
Return values
bool|null —

isNullable()

Checks if a property is nullable

public static isNullable(string $property) : bool
Parameters
$property : string
Return values
bool —

isNullableSetToNull()

Checks if a nullable property is set to null.

public isNullableSetToNull(string $property) : bool
Parameters
$property : string
Return values
bool —

listInvalidProperties()

Show all the invalid properties with reasons.

public listInvalidProperties() : array<string|int, mixed>
Return values
array<string|int, mixed> —

invalid properties with reasons

offsetExists()

Returns true if offset exists. False otherwise.

public offsetExists(int $offset) : bool
Parameters
$offset : int

Offset

Return values
bool —

offsetGet()

Gets offset.

public offsetGet(int $offset) : mixed|null
Parameters
$offset : int

Offset

Return values
mixed|null —

offsetSet()

Sets value based on offset.

public offsetSet(int|null $offset, mixed $value) : void
Parameters
$offset : int|null

Offset

$value : mixed

Value to be set

Return values
void —

offsetUnset()

Unsets offset.

public offsetUnset(int $offset) : void
Parameters
$offset : int

Offset

Return values
void —

openAPIFormats()

Array of property to format mappings. Used for (de)serialization

public static openAPIFormats() : array<string|int, mixed>
Return values
array<string|int, mixed> —

openAPITypes()

Array of property to type mappings. Used for (de)serialization

public static openAPITypes() : array<string|int, mixed>
Return values
array<string|int, mixed> —

setArray()

Sets array

public setArray(bool|null $array) : self
Parameters
$array : bool|null

array

Return values
self —

setBigDecimal()

Sets big_decimal

public setBigDecimal(bool|null $big_decimal) : self
Parameters
$big_decimal : bool|null

big_decimal

Return values
self —

setBigInteger()

Sets big_integer

public setBigInteger(bool|null $big_integer) : self
Parameters
$big_integer : bool|null

big_integer

Return values
self —

setBinary()

Sets binary

public setBinary(bool|null $binary) : self
Parameters
$binary : bool|null

binary

Return values
self —

setBoolean()

Sets boolean

public setBoolean(bool|null $boolean) : self
Parameters
$boolean : bool|null

boolean

Return values
self —

setContainer()

Sets container

public setContainer(bool|null $container) : self
Parameters
$container : bool|null

container

Return values
self —

setDouble()

Sets double

public setDouble(bool|null $double) : self
Parameters
$double : bool|null

double

Return values
self —

setEmbeddedValue()

Sets embedded_value

public setEmbeddedValue(bool|null $embedded_value) : self
Parameters
$embedded_value : bool|null

embedded_value

Return values
self —

setEmpty()

Sets empty

public setEmpty(bool|null $empty) : self
Parameters
$empty : bool|null

empty

Return values
self —

setFloat()

Sets float

public setFloat(bool|null $float) : self
Parameters
$float : bool|null

float

Return values
self —

setFloatingPointNumber()

Sets floating_point_number

public setFloatingPointNumber(bool|null $floating_point_number) : self
Parameters
$floating_point_number : bool|null

floating_point_number

Return values
self —

setInt()

Sets int

public setInt(bool|null $int) : self
Parameters
$int : bool|null

int

Return values
self —

setIntegralNumber()

Sets integral_number

public setIntegralNumber(bool|null $integral_number) : self
Parameters
$integral_number : bool|null

integral_number

Return values
self —

setLong()

Sets long

public setLong(bool|null $long) : self
Parameters
$long : bool|null

long

Return values
self —

setMissingNode()

Sets missing_node

public setMissingNode(bool|null $missing_node) : self
Parameters
$missing_node : bool|null

missing_node

Return values
self —

setNodeType()

Sets node_type

public setNodeType(string|null $node_type) : self
Parameters
$node_type : string|null

node_type

Return values
self —

setNull()

Sets null

public setNull(bool|null $null) : self
Parameters
$null : bool|null

null

Return values
self —

setNumber()

Sets number

public setNumber(bool|null $number) : self
Parameters
$number : bool|null

number

Return values
self —

setObject()

Sets object

public setObject(bool|null $object) : self
Parameters
$object : bool|null

object

Return values
self —

setPojo()

Sets pojo

public setPojo(bool|null $pojo) : self
Parameters
$pojo : bool|null

pojo

Return values
self —

setShort()

Sets short

public setShort(bool|null $short) : self
Parameters
$short : bool|null

short

Return values
self —

setString()

Sets string

public setString(bool|null $string) : self
Parameters
$string : bool|null

string

Return values
self —

setters()

Array of attributes to setter functions (for deserialization of responses)

public static setters() : array<string|int, mixed>
Return values
array<string|int, mixed> —

setTextual()

Sets textual

public setTextual(bool|null $textual) : self
Parameters
$textual : bool|null

textual

Tags
deprecated
Return values
self —

setValueNode()

Sets value_node

public setValueNode(bool|null $value_node) : self
Parameters
$value_node : bool|null

value_node

Return values
self —

toHeaderValue()

Gets a header-safe presentation of the object

public toHeaderValue() : string
Return values
string —

valid()

Validate all the properties in the model return true if all passed

public valid() : bool
Return values
bool —

True if all properties are valid

openAPINullables()

Array of nullable properties

protected static openAPINullables() : array<string|int, mixed>
Return values
array<string|int, mixed> —

getOpenAPINullablesSetToNull()

Array of nullable field names deliberately set to null

private getOpenAPINullablesSetToNull() : array<string|int, bool>
Return values
array<string|int, bool> —

setIfExists()

Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the $this->openAPINullablesSetToNull array

private setIfExists(string $variableName, array<string|int, mixed> $fields, mixed $defaultValue) : void
Parameters
$variableName : string
$fields : array<string|int, mixed>
$defaultValue : mixed
Return values
void —

setOpenAPINullablesSetToNull()

Setter - Array of nullable field names deliberately set to null

private setOpenAPINullablesSetToNull(array<string|int, bool> $openAPINullablesSetToNull) : void
Parameters
$openAPINullablesSetToNull : array<string|int, bool>
Return values
void —

Search results