Anemone::count()
Counts the amount of data.
Table of Contents
Description
Anemone::count(): int;
This method is a requirement to be able to implement the Countable
interface and aims to make the object countable via the count()
function. This method is public, so it can also be called as how you would call any public methods in general.
Example
$anemone = new Anemone([1, 2, 3, 4, 5]);
test($anemone->count()); // Returns `5`
test(count($anemone)); // Returns `5`
Anemone::_()
The dynamic method initiator.
Anemone::__call()
Proxy for missing methods.
Anemone::__callStatic()
Proxy for missing static methods.
Anemone::__construct()
The constructor.
Anemone::__destruct()
The desctructor.
Anemone::__get()
Proxy for missing properties.
Anemone::__invoke()
Proxy for the current object, called as a function.
Anemone::__serialize()
Provides data to be serialized.
Anemone::__toString()
Proxy for the current object, casted as a string.
Anemone::__unserialize()
Converts the serialized data back to its object.
Anemone::all()
Checks if all items in the data pass the test.
Anemone::any()
Checks if at least one item in the data passes the test.
Anemone::chunk()
Splits the data into chunks.
Anemone::count()
Counts the amount of data.
Anemone::find()
Returns the first item in the data that passes the test.
Anemone::first()
Returns the first item in the data.
Anemone::from()
Object instantiator.
Anemone::get()
Gets value recursively.
Anemone::getIterator()
The external iterator receiver.
Anemone::has()
Checks for the existence of a key recursively.
Anemone::index()
Gets item position index in the data by key.
Anemone::is()
Filters the data so that only items that pass the test are left.
Anemone::join()
Joins the data into a string.
Anemone::jsonSerialize()
Returns the data to be serialized as JSON.
Anemone::key()
Gets item key in data by position index.
Anemone::last()
Returns the last item in the data.
Anemone::let()
Deletes value recursively.
Anemone::map()
Creates a new data set from the current data.
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::offsetExists()
Checks if an item with a certain key/index exists in the data.
Anemone::offsetGet()
Gets an item in the data using its key/index.
Anemone::offsetSet()
Sets a value to the specified key/index in the data.
Anemone::offsetUnset()
Deletes an item at the specified key/index in the data.
Anemone::pluck()
Returns a new data set contains values from the key on every item.
Anemone::reverse()
Reverses the order of the data.
Anemone::set()
Sets value recursively.
Anemone::shake()
Shakes the order of the data.
Anemone::sort()
Sorts the data.