XmlSerialized
in package
implements
JsonSerializable
Serialization
This class represents a deserialized object from XML.
Table of Contents
Interfaces
- JsonSerializable
Properties
- $attributes : array<string|int, mixed>
- $content : mixed
- $name : string
- $_attributes : object
- The list of attributes.
- $_content : object|array<string|int, mixed>|null
- The list of elements.
- $_name : string
- The name of the element.
Methods
- __construct() : mixed
- Constructor.
- __get() : mixed|null
- Getter.
- __set() : void
- Setter.
- jsonSerialize() : object
- Returns the object for JSON serialization.
- jsonUnserialize() : XmlSerialized|XmlCData|array<string|int, mixed>|null
- Unserializes the object from JSON.
Properties
$attributes
public
array<string|int, mixed>
$attributes
- аттрибуты
$content
public
mixed
$content
- данные
$name
public
string
$name
$_attributes
The list of attributes.
private
object
$_attributes
$_content
The list of elements.
private
object|array<string|int, mixed>|null
$_content
$_name
The name of the element.
private
string
$_name
Methods
__construct()
Constructor.
public
__construct([string|null $name = null ][, array<string|int, mixed>|null $attributes = null ][, array<string|int, mixed>|null $content = null ]) : mixed
Parameters
- $name : string|null = null
-
The name of the element.
- $attributes : array<string|int, mixed>|null = null
-
The list of attributes.
- $content : array<string|int, mixed>|null = null
-
The content.
__get()
Getter.
public
__get(string $property) : mixed|null
Parameters
- $property : string
-
The property name.
Return values
mixed|null —The value of the property.
__set()
Setter.
public
__set(string $property, mixed $value) : void
Parameters
- $property : string
-
The property name.
- $value : mixed
-
The value to set.
jsonSerialize()
Returns the object for JSON serialization.
public
jsonSerialize() : object
Return values
object —The object representation of XmlSerialized.
jsonUnserialize()
Unserializes the object from JSON.
public
static jsonUnserialize(string|array<string|int, mixed> $jsonString) : XmlSerialized|XmlCData|array<string|int, mixed>|null
Parameters
- $jsonString : string|array<string|int, mixed>
-
The JSON string or array.
Return values
XmlSerialized|XmlCData|array<string|int, mixed>|null —The unserialized object.