◆ __construct()
TripalWebServiceCollection::__construct |
( |
|
$service_path, |
|
|
|
$params |
|
) |
| |
Implements the constructor.
- Parameters
-
◆ addMember()
TripalWebServiceCollection::addMember |
( |
|
$member | ) |
|
Adds a new member to this resource if it is a collection.
- Parameters
-
◆ getContext()
TripalWebServiceCollection::getContext |
( |
| ) |
|
Retrieves the data section of the resource.
The JSON-LD response constists of two sections the '@context' section and the data section. This function only returns the data section for this resource
- Returns
- An associative array containing the data section of the response.
Reimplemented from TripalWebServiceResource.
◆ getData()
TripalWebServiceCollection::getData |
( |
| ) |
|
Retrieves the data section of the resource.
The JSON-LD response constists of two sections the '@context' section and the data section. This function only returns the data section for this resource
- Returns
- An associative array containing the data section of the response.
Reimplemented from TripalWebServiceResource.
◆ initPager()
TripalWebServiceCollection::initPager |
( |
|
$totalItems, |
|
|
|
$itemsPerPage, |
|
|
|
$page |
|
) |
| |
Initializes the pager.
- Parameters
-
$totalItems | The total number of items available. |
$itemsPerPage | The maximum number of items per page. |
$path | The path |
◆ setType()
TripalWebServiceCollection::setType |
( |
|
$type | ) |
|
◆ $doPaging
TripalWebServiceCollection::$doPaging |
|
protected |
Set to TRUE if paging should be enabled. Paging is disabled by default.
◆ $itemsPerPage
TripalWebServiceCollection::$itemsPerPage |
|
protected |
When the collection contains more than the itemsPerpage amount then the results will be paged.
◆ $members
TripalWebServiceCollection::$members |
|
protected |
Holds the data portion of the JSON-LD response if this resource is a collection.
◆ $page
TripalWebServiceCollection::$page |
|
protected |
The current page of the pager.
◆ $params
TripalWebServiceCollection::$params |
|
protected |
The parameters as collected by the parent TripalWebService. We need the parameters because this Resource generates first, next, prev, and last links and we need to maintain the parameters a user may have provided in those links.
◆ $totalItems
TripalWebServiceCollection::$totalItems |
|
protected |
The total number of items. This variable is used if paging is turned on. Otherwise it's ignored and the total number of items reported by the collection will be the number of elements in the $members array.
The documentation for this class was generated from the following file:
- tripal_ws/includes/TripalWebServiceCollection.inc