trait Configurable

Provides magic get, set, isset and unset implementations

Methods

mixed
__get(string $propName)

Magic getter

void
__set(string $propName, mixed $propValue)

Magic setter

bool
__isset(string $propName)

Test whether a property is set

void
__unset(string $propName)

Unset a property, if the class supports it

Details

at line 30
mixed __get(string $propName)

Magic getter

Will return $this->foo if it exists, then $this->getFoo() or will throw an exception if neither exists

Parameters

string $propName

Return Value

mixed

at line 61
void __set(string $propName, mixed $propValue)

Magic setter

Will call $this->setFoo($propValue) if it exists, otherwise it will set $this->foo. If $this->foo is a NormalizedCollection, we do not replace it, instead we clear() it then fill it back up. It will not overwrite an object with a different incompatible object (of a different, non-extending class) and it will throw an exception if the PHP type cannot match without incurring data loss.

Parameters

string $propName
mixed $propValue

Return Value

void

at line 147
bool __isset(string $propName)

Test whether a property is set

Parameters

string $propName

Return Value

bool

at line 164
void __unset(string $propName)

Unset a property, if the class supports it

Parameters

string $propName

Return Value

void