trait Setter (View source)

This trait is run when writing data to inaccessible (protected or private) or non-existing properties.

Methods:

  • __set(string $name, mixed $value): void: Magic method to set the value of inaccessible or non-existing properties.

Fields:

  • $property: Stores properties for dynamic property access.

Traits

This trait provides a private array property intended for use with magic setter and getter methods.

Methods

void
__set(string $name, mixed $value)

This method is run when writing data to inaccessible (protected or private) or non-existing properties.

Details

void __set(string $name, mixed $value)

This method is run when writing data to inaccessible (protected or private) or non-existing properties.

Parameters

string $name

Argument to be tested

mixed $value

The value to be defined

Return Value

void