Caller
trait Caller (View source)
This trait uses the Getter and Setter traits to facilitate dynamic property access. The __call method handles instance method calls,
while __callStatic manages static method calls. Both methods interpret method names starting with 'set' or 'get' to perform
corresponding actions on properties.
Methods:
__get(string $name): mixed:Retrieves the value of a property if it exists, or returns null if the property is inaccessible or non-existent.__set(string $name, mixed $value): void:Magic method to set the value of inaccessible or non-existing properties.__call(string $name, array $arguments): mixed:Handles dynamic instance method calls.__callStatic(string $name, array $arguments): mixed:Handles dynamic static method calls.
Fields:
$property: Stores properties for dynamic property access.
Traits
This trait is utilized for reading data from inaccessible (protected or private) or non-existing properties.
This trait is run when writing data to inaccessible (protected or private) or non-existing properties.
This trait provides a private array property intended for use with magic setter and getter methods.
This trait provides a private array property intended for use with magic setter and getter methods.
Methods
Magic method to get the value of inaccessible or non-existing properties.
This method is run when writing data to inaccessible (protected or private) or non-existing properties.
Triggered when invoking inaccessible methods in an object context
Triggered when invoking inaccessible methods in a static context
Details
in
Getter at line 26
mixed
__get(string $name)
Magic method to get the value of inaccessible or non-existing properties.
in
Setter at line 27
void
__set(string $name, mixed $value)
This method is run when writing data to inaccessible (protected or private) or non-existing properties.
mixed
__call(string $name, array $arguments)
Triggered when invoking inaccessible methods in an object context
static mixed
__callStatic(string $name, array $arguments)
Triggered when invoking inaccessible methods in a static context