Count
in package
implements
TransformerInterface
Count elements in Array or Countable object.
Interfaces, Classes and Traits
- TransformerInterface
- An interface to define a transformer.
Table of Contents
- transform() : number
- Count elements in Array or Countable object.
- validate() : mixed
- Validate Transformer arguments.
Methods
transform()
Count elements in Array or Countable object.
public
transform(array<string|int, mixed>|Countable $value[, stdClass|null $arguments = null ][, string|null $default_value = null ]) : number
Parameters
- $value : array<string|int, mixed>|Countable
-
an array to count.
- $arguments : stdClass|null = null
-
arguments.
- $default_value : string|null = null
-
default value.
Return values
number —validate()
Validate Transformer arguments.
public
validate([stdClass|null $arguments = null ]) : mixed
Parameters
- $arguments : stdClass|null = null
-
arguments to validate.