MagicTrait
trait MagicTrait
Trait MagicTrait. Contains magic methods: setter, getter, isset, call and has To reduce code on pure PHP classes with good practices and recomendations.
Methods
Magic isset.
Magic getter.
Magic setter.
Intercepts calls to non-existent getters / setters Looks at the beginning of $method to see if it's "get", "set", "has" Uses preg_match() to extract the 2nd part of the match, which should produce the property name
Details
at line 26
bool
__isset(string $key)
Magic isset.
at line 38
mixed|null
__get(string $key)
Magic getter.
at line 51
__set(string $key, mixed $value)
Magic setter.
at line 72
$this|bool|mixed|string|null
__call(string $method, array $params)
Intercepts calls to non-existent getters / setters Looks at the beginning of $method to see if it's "get", "set", "has" Uses preg_match() to extract the 2nd part of the match, which should produce the property name