Anemone::mitose()

Creates a new instance without reference it to a variable.

Description

Anemone::mitose(): Anemone;

This method makes a copy of the current instance and returns it. It stores the previous instance into the parent property of the instance copy.

$anemone = new Anemone([1, 2, 3, 4, 5]);

$test = $anemone->mitose();

$test->let('0');
$test->set('5', '#');

test($anemone->get()); // Returns `[1, 2, 3, 4, 5]`
test($test->get()); // Returns `[1 => 2, 2 => 3, 3 => 4, 4 => 5, 5 => '#']`
test($test === $anemone); // Returns `false`
test($test->parent === $anemone); // Returns `true`
test($anemone->parent); // Returns `null`

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::mitose()

Creates a new instance without reference it to a variable.

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.