Documentation

SettingsContainerInterface extends JsonSerializable, Serializable

a generic container with magic getter and setter

Table of Contents

Methods

__get()  : mixed|null
Retrieve the value of $property
__isset()  : bool
Checks if $property is set (aka. not null), excluding private properties
__set()  : void
Set $property to $value while avoiding private and non-existing properties
__toString()  : string
__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
toArray()  : array<string, mixed>
Returns an array representation of the settings object
toJSON()  : string
Returns a JSON representation of the settings object

Methods

__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

__set()

Set $property to $value while avoiding private and non-existing properties

public __set(string $property, mixed $value) : void
Parameters
$property : string
$value : 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|int, mixed> $properties) : static

The values will be run through the magic __set(), which may also call custom setters.

Parameters
$properties : iterable<string|int, mixed>
Tags
phpstan-param

array<string, mixed> $properties

Return values
static

toArray()

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>

        
On this page

Search results