ChainsNestedItemsInterface
interface ChainsNestedItemsInterface
Contract for Managers that use magic methods to burrow into the item store See src/Traits/ChainsNestedItemsTrait.php for implementation example.
Methods
Deletes item at the current level of nesting (and below)
Sets the current level of nesting.
Retrieves a value from the manager at the current nest level.
Sets an item at the current nest level.
Details
at line line 15
mixed
drop()
Deletes item at the current level of nesting (and below)
at line line 30
$this
__get(string $name)
Sets the current level of nesting.
When burrowing into a manager using magic methods, each
level is a property $manager->one->two->etc
. This method
must set the current level. It does NOT return a value, only
$this for method chaining.
See src/Traits/ChainsNestedItemsTrait.php for implementation example.
at line line 46
mixed
__call(string $name, array $arguments)
Retrieves a value from the manager at the current nest level.
Must return a value using $manager->get() using the called $name as the alias and the current level set by __get() as the prefix. Should throw ItemNotFoundException if item is not found.
See src/Traits/ChainsNestedItemsTrait.php for implementation example.
at line line 61
$this
__set(string $key, mixed $value)
Sets an item at the current nest level.
Similar to __call() above. Must navigate to desired level through methods <$manager->one()->two()...> and then you can set a value as a property <$manger->one()->two = "two">
See src/Traits/ChainsNestedItemsTrait.php for implementation example.