mirror of
https://github.com/getgrav/grav.git
synced 2026-05-07 18:25:37 +02:00
added useful toArray() method on Iterator
This commit is contained in:
@@ -45,6 +45,16 @@ class Iterator implements \ArrayAccess, \Iterator, \Countable, \Serializable
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the internal array used in this Iterator
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function toArray()
|
||||
{
|
||||
return $this->items;
|
||||
}
|
||||
|
||||
/**
|
||||
* Convents iterator to a comma separated list.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user