TestContainer
extends SettingsContainerAbstract
in package
uses
TestOptionsTrait
Table of Contents
Properties
- $test1 : string
- $test2 : bool|null
- $test4 : string|null
- $test5 : string
- $test6 : string|null
- $testConstruct : string
- $test3 : 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|int, mixed>
- Returns a serialized string representation of the object in its current state (except static/readonly properties)
- __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
- __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.)
- get_test6() : string
- set_test5() : void
- TestOptionsTrait() : void
Properties
$test1
protected
string
$test1
= 'foo'
$test2
protected
bool|null
$test2
= null
$test4
protected
string|null
$test4
= null
$test5
protected
string
$test5
= ''
$test6
protected
string|null
$test6
= null
$testConstruct
protected
string
$testConstruct
$test3
private
string
$test3
= 'what'
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
Tags
Return values
mixed|null__isset()
Checks if $property is set (aka. not null), excluding private properties
public
__isset(string $property) : bool
Parameters
- $property : string
Tags
Return values
bool__serialize()
Returns a serialized string representation of the object in its current state (except static/readonly properties)
public
__serialize() : array<string|int, mixed>
Tags
Return values
array<string|int, 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
Tags
__toString()
public
__toString() : string
Tags
Return values
string__unserialize()
Restores the data from the given array to the current instance
public
__unserialize(array<string, mixed> $data) : void
Parameters
- $data : array<string, mixed>
Tags
__unset()
Unsets $property while avoiding private and non-existing properties
public
__unset(string $property) : void
Parameters
- $property : string
Tags
fromIterable()
Sets properties from a given iterable
public
fromIterable(iterable<string|int, mixed> $properties) : static
Parameters
- $properties : iterable<string|int, mixed>
Tags
Return values
staticfromJSON()
Sets properties from a given JSON string
public
fromJSON(string $json) : static
Parameters
- $json : string
Tags
Return values
staticjsonSerialize()
public
jsonSerialize() : array<string, mixed>
Tags
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
Tags
Return values
stringtoArray()
Returns an array representation of the settings object
public
toArray() : array<string, mixed>
Tags
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
Tags
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
get_test6()
protected
get_test6() : string
Return values
stringset_test5()
protected
set_test5(string $value) : void
Parameters
- $value : string
TestOptionsTrait()
protected
TestOptionsTrait() : void