PHP Interface Pinq\IAggregatable

Author: Elliot Levin ([email protected])
Inheritance: extends Countable
Afficher le fichier Open project: timetoogo/pinq

Méthodes publiques

Méthode Description
aggregate ( callable $function ) : mixed Aggregates the values with the supplied function.
all ( callable $function = null ) : boolean Returns a boolean of if all the values evaluate to true.
any ( callable $function = null ) : boolean Returns a boolean of if any of the values evaluate to true.
average ( callable $function = null ) : integer | double | null Returns the average of the values.
count ( ) : integer Returns the amount of the values.
implode ( string $delimiter, callable $function = null ) : string Returns a string of all the values concatenated by the delimiter.
isEmpty ( ) : boolean Returns whether the traversable contains no elements.
maximum ( callable $function = null ) : mixed Returns the maximum value.
minimum ( callable $function = null ) : mixed Returns the maximum value.
sum ( callable $function = null ) : integer | double | null Returns the sum of the values.

Method Details

aggregate() public méthode

Aggregates the values with the supplied function.
public aggregate ( callable $function ) : mixed
$function callable The aggregate function, parameters: ($aggregate, $step)
Résultat mixed

all() public méthode

Returns a boolean of if all the values evaluate to true.
public all ( callable $function = null ) : boolean
$function callable The function which will return the values.
Résultat boolean

any() public méthode

Returns a boolean of if any of the values evaluate to true.
public any ( callable $function = null ) : boolean
$function callable The function which will return the values.
Résultat boolean

average() public méthode

Returns the average of the values.
public average ( callable $function = null ) : integer | double | null
$function callable The function which will return the values.
Résultat integer | double | null

count() public méthode

Returns the amount of the values.
public count ( ) : integer
Résultat integer

implode() public méthode

Returns a string of all the values concatenated by the delimiter.
public implode ( string $delimiter, callable $function = null ) : string
$delimiter string The string to delimit the values by.
$function callable The function which will return the values.
Résultat string

isEmpty() public méthode

Returns whether the traversable contains no elements.
public isEmpty ( ) : boolean
Résultat boolean

maximum() public méthode

Returns the maximum value.
public maximum ( callable $function = null ) : mixed
$function callable The function which will return the values.
Résultat mixed

minimum() public méthode

Returns the maximum value.
public minimum ( callable $function = null ) : mixed
$function callable The function which will return the values.
Résultat mixed

sum() public méthode

Returns the sum of the values.
public sum ( callable $function = null ) : integer | double | null
$function callable The function which will return the values.
Résultat integer | double | null