5 if ( ! defined(
'GRAVITYVIEW_DIR' ) ) {
16 private $storage = array();
39 $this->count() && ( $this->storage = array() );
52 array_map( array( $this,
'add'), $collection->all() );
62 public function all() {
63 return $this->storage;
74 return end( $this->storage );
85 return reset( $this->storage );
96 return count( $this->storage );
count()
Returns the count of the objects in this collection.
all()
Returns all the objects in this collection as an an array.
merge(\GV\Collection $collection)
Merge another collection into here.
If this file is called directly, abort.
last()
Get the last added object.
clear()
Clear this collection.
first()
Get the first added object.
add( $value)
Add an object to this collection.