Anemone::__call()

Proxy for missing methods.

Table of Contents
  1. Description
  2. Example

Description

Anemone::__call(string $kin, array $lot = []): mixed;

This method will be called when a public method is not available on class Anemone. By default, this method will first try to find an existing public property and return it, ignoring the given method arguments.

If a public property exists with the same name as the called method name, then this method will return the value of that property. If there is a dynamic method created by Anemone::_(), then this method will return the value of that dynamic method. Otherwise, this method will return null.

Example

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

$asdf = $anemone->asdf(123); // Returns `null` because method `asdf()` does not exist
$value = $anemone->value(123); // Returns `$anemone->value` because property `value` does exist

Anemone::__call()

Proxy for missing methods.

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.