Anemone::let()

Deletes value recursively.

Table of Contents
  1. Description
  2. Example

Description

Anemone::let(?string $key = null): bool;

Deletes value recursively using dot notation syntax. This is the OOP style of function let(), implemented as a class method. This method returns true if there is a value to delete, returns false if there is no value to delete.

Example

$anemone = new Anemone([
    'foo' => 1,
    'bar' => [
        'baz' => 2,
        'qux' => 3
    ]
]);

$foo = $anemone->let('foo'); // Returns `true`
$baz = $anemone->let('bar.baz'); // Returns `true`
$wut = $anemone->let('bar.wut'); // Returns `false`

$all = $anemone->let(); // Returns `true`

Anemone::any()

Checks if at least one item in the data passes the test.

Anemone::is()

Filters the data so that only items that pass the test are left.

Anemone::let()

Deletes value recursively.

Anemone::not()

Filters the data so that only items that do not pass the test are left.

Anemone::pluck()

Returns a new data set contains values from the key on every item.