Anemone::shake()

Shakes the order of the data.

Table of Contents
  1. Description
  2. Example

Description

Anemone::shake(bool $keys = false): self;
Anemone::shake(callable $fn): self;

This is the OOP style of function shake(), implemented as a class method. This method randomizes the order of the data.

Example

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

test($anemone->mitose()->shake()->get());
test($anemone->mitose()->shake(true)->get());

You call the Anemone::get() method to return raw array values, but you can also directly iterate over it.

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::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.

Anemone::shake()

Shakes the order of the data.