class
League
/
CommonMark
/
Util
/
ArrayCollection
You are viewing an older version of the documentation. For the latest, please visit 2.4 documentation.
final
ArrayCollection
Array collection
Provides a wrapper around a standard PHP array.
Implements
Properties
private
$elements
array
Default: null
Methods
public
__construct ( array $elements ) : void
Constructor
Parameters
-
$elements
array
|string,mixed>
public
first ( ) : mixed|false
public
last ( ) : mixed|false
public
getIterator
(
)
:
ArrayIterator
Retrieve an external iterator
public
count ( ) : int
Count elements of an object
public
offsetExists ( $offset ) : void
Whether an offset exists
public
offsetGet ( $offset ) : void
Offset to retrieve
public
offsetSet ( $offset , $value ) : void
Offset to set
public
offsetUnset ( $offset ) : void
Offset to unset
public
slice
(
int
$offset
,
int
$length
)
:
array
Returns a subset of the array
public