ExceptionTestContainer
extends SettingsContainerAbstract
in package
Attributes
- #[ThrowOnInvalidProperty]
- true
Table of Contents
Constants
- GET_PREFIX = 'get_'
- SET_PREFIX = 'set_'
Properties
- $accessible : string
- $inaccessible : string
Methods
- __construct() : mixed
- SettingsContainerAbstract constructor.
- __get() : mixed|null
- Retrieve the value of $property
- __isset() : bool
- Checks if $property is set (aka. not null), excluding private properties
- __serialize() : array<string, mixed>
- Returns a serialized array representation of the object in its current state (except static/readonly properties), bypassing custom getters and property hooks
- __set() : void
- Set $property to $value while avoiding private and non-existing properties
- __toString() : string
- __unserialize() : void
- Restores the data from the given array to the current instance, bypassing custom setters and property hooks
- __unset() : void
- Unsets $property while avoiding private and non-existing properties
- fromIterable() : static
- Sets properties from a given iterable
- fromJSON() : static
- Sets properties from a given JSON string
- jsonSerialize() : array<string, mixed>
- serialize() : string
- Returns a serialized string representation of the object in its current state (except static/readonly properties)
- toArray() : array<string, mixed>
- Returns an array representation of the settings object
- toJSON() : string
- Returns a JSON representation of the settings object
- unserialize() : void
- Restores the data (except static/readonly properties) from the given serialized object to the current instance
- construct() : void
- calls a method with trait name as replacement constructor for each used trait (remember pre-php5 classname constructors? yeah, basically this.)
Constants
GET_PREFIX
protected
mixed
GET_PREFIX
= 'get_'
SET_PREFIX
protected
mixed
SET_PREFIX
= 'set_'
Properties
$accessible
protected
string
$accessible
= 'yay'
$inaccessible
private
string
$inaccessible
= 'nay'
Methods
__construct()
SettingsContainerAbstract constructor.
public
__construct([iterable<string|int, mixed>|null $properties = null ]) : mixed
Parameters
- $properties : iterable<string|int, mixed>|null = null
Tags
__get()
Retrieve the value of $property
public
__get(string $property) : mixed|null
Parameters
- $property : string
Return values
mixed|null__isset()
Checks if $property is set (aka. not null), excluding private properties
public
__isset(string $property) : bool
Parameters
- $property : string
Return values
bool__serialize()
Returns a serialized array representation of the object in its current state (except static/readonly properties), bypassing custom getters and property hooks
public
__serialize() : array<string, mixed>
Return values
array<string, mixed>__set()
Set $property to $value while avoiding private and non-existing properties
public
__set(string $property, mixed $value) : void
Parameters
- $property : string
- $value : mixed
__toString()
public
__toString() : string
Return values
string__unserialize()
Restores the data from the given array to the current instance, bypassing custom setters and property hooks
public
__unserialize(array<string, mixed> $data) : void
Parameters
- $data : array<string, mixed>
__unset()
Unsets $property while avoiding private and non-existing properties
public
__unset(string $property) : void
Parameters
- $property : string
fromIterable()
Sets properties from a given iterable
public
fromIterable(iterable<string, mixed> $properties) : static
Parameters
- $properties : iterable<string, mixed>
Return values
staticfromJSON()
Sets properties from a given JSON string
public
fromJSON(string $json) : static
Parameters
- $json : string
Return values
staticjsonSerialize()
public
jsonSerialize() : array<string, mixed>
Return values
array<string, mixed>serialize()
Returns a serialized string representation of the object in its current state (except static/readonly properties)
public
serialize() : string
Return values
stringtoArray()
Returns an array representation of the settings object
public
toArray() : array<string, mixed>
The values will be run through the magic __get(), which may also call custom getters.
Return values
array<string, mixed>toJSON()
Returns a JSON representation of the settings object
public
toJSON([int|null $jsonOptions = null ]) : string
Parameters
- $jsonOptions : int|null = null
Return values
stringunserialize()
Restores the data (except static/readonly properties) from the given serialized object to the current instance
public
unserialize(string $data) : void
Parameters
- $data : string
Tags
construct()
calls a method with trait name as replacement constructor for each used trait (remember pre-php5 classname constructors? yeah, basically this.)
protected
construct() : void