Documentation

SettingsContainerAbstract
in package
implements SettingsContainerInterface

AbstractYes

Table of Contents

Interfaces

SettingsContainerInterface
a generic container with magic getter and setter

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.)

Methods

__construct()

SettingsContainerAbstract constructor.

public __construct([iterable<string|int, mixed>|null $properties = null ]) : mixed
Parameters
$properties : iterable<string|int, mixed>|null = null
Tags
phpstan-param

array<string, mixed> $properties

__get()

Retrieve the value of $property

public __get(string $property) : mixed|null
Parameters
$property : string
Tags
inheritdoc
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
inheritdoc
Return values
bool

__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
inheritdoc

__unset()

Unsets $property while avoiding private and non-existing properties

public __unset(string $property) : void
Parameters
$property : string
Tags
inheritdoc

fromIterable()

Sets properties from a given iterable

public fromIterable(iterable<string|int, mixed> $properties) : static
Parameters
$properties : iterable<string|int, mixed>
Tags
inheritdoc
Return values
static

fromJSON()

Sets properties from a given JSON string

public fromJSON(string $json) : static
Parameters
$json : string
Tags
inheritdoc
Return values
static

jsonSerialize()

public jsonSerialize() : array<string, mixed>
Tags
inheritdoc
Return values
array<string, mixed>

toArray()

Returns an array representation of the settings object

public toArray() : array<string, mixed>
Tags
inheritdoc
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
inheritdoc
Return values
string

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

        
On this page

Search results