GravityView  2.17
The best, easiest way to display Gravity Forms entries on your website.
Public Member Functions | Private Attributes
Collection Class Reference

If this file is called directly, abort. More...

Inheritance diagram for Collection:
Entry_Collection Field_Collection Form_Collection View_Collection Widget_Collection

Public Member Functions

 add ( $value)
 Add an object to this collection. More...
 
 all ()
 Returns all the objects in this collection as an an array. More...
 
 clear ()
 Clear this collection. More...
 
 count ()
 Returns the count of the objects in this collection. More...
 
 first ()
 Get the first added object. More...
 
 last ()
 Get the last added object. More...
 
 merge (\GV\Collection $collection)
 Merge another collection into here. More...
 

Private Attributes

 $storage = array()
 

Detailed Description

If this file is called directly, abort.

A generic Collection base class.

Definition at line 12 of file class-gv-collection.php.

Member Function Documentation

◆ add()

add (   $value)

Add an object to this collection.

Parameters
mixed$valueThe object to be added.
Since
2.0
Returns
void

Definition at line 27 of file class-gv-collection.php.

References $value.

◆ all()

all ( )

Returns all the objects in this collection as an an array.

Since
2.0
Returns
array The objects in this collection.

Definition at line 62 of file class-gv-collection.php.

◆ clear()

clear ( )

Clear this collection.

Since
2.0
Returns
void

Definition at line 38 of file class-gv-collection.php.

◆ count()

count ( )

Returns the count of the objects in this collection.

Since
2.0
Returns
int The size of this collection.

Definition at line 95 of file class-gv-collection.php.

◆ first()

first ( )

Get the first added object.

Since
2.0
Returns
mixed|null The first item in here, or null if there are none.

Definition at line 84 of file class-gv-collection.php.

◆ last()

last ( )

Get the last added object.

Since
2.0
Returns
mixed|null The last item in here, or null if there are none.

Definition at line 73 of file class-gv-collection.php.

◆ merge()

merge ( \GV\Collection  $collection)

Merge another collection into here.

Parameters
\GV\Collection$collectionThe collection to be merged.
Since
2.0
Returns
void

Definition at line 51 of file class-gv-collection.php.

Field Documentation

◆ $storage

$storage = array()
private

Definition at line 16 of file class-gv-collection.php.


The documentation for this class was generated from the following file: