trait PagerTrait (View source)

Trait for adding a pager to a class.

Methods

getApi()

Retrieve the KlaviyoApi service object.

array
getAllRecords($resource, $query_parameters = array())

Reteive all records for the specified paginated resource.

array
getRecordsFromSpecificPage($resource, $page, $count, $query_parameters = array())

Retrieve the records from a specific page.

array
getPage($resource, $page, $count = 50, $query_parameters = array())

Retrieve a specific page from Klaviyo.

Details

at line line 15
getApi()

Retrieve the KlaviyoApi service object.

at line line 28
array getAllRecords($resource, $query_parameters = array())

Reteive all records for the specified paginated resource.

Parameters

$resource
$query_parameters

Return Value

array An array of all records retrieved from the API.

at line line 50
array getRecordsFromSpecificPage($resource, $page, $count, $query_parameters = array())

Retrieve the records from a specific page.

Parameters

$resource
$page
$count
$query_parameters

Return Value

array An array of all records retrieved from the API for the specified page.

at line line 66
array getPage($resource, $page, $count = 50, $query_parameters = array())

Retrieve a specific page from Klaviyo.

Parameters

$resource
$page
$count
$query_parameters

Return Value

array An array of information that represents a page.