trait Cleaner (View source)

This trait provides magic methods to handle __isset and unset operations on inaccessible or non-existing properties within a class.

Methods:

  • __isset(string $name): bool: Checks if a property is set.
  • __unset(string $name): void: Unsets a property.

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

bool
__isset(string $name)

This method is triggered by calling isset() or empty() on inaccessible (protected or private) or non-existing properties.

void
__unset(string $name)

This method is invoked when unset() is used on inaccessible (protected or private) or non-existing properties.

Details

bool __isset(string $name)

This method is triggered by calling isset() or empty() on inaccessible (protected or private) or non-existing properties.

Parameters

string $name

Argument to be tested

Return Value

bool

void __unset(string $name)

This method is invoked when unset() is used on inaccessible (protected or private) or non-existing properties.

Parameters

string $name

Argument to be tested

Return Value

void