PHP Класс Braintree\ResourceCollection

stores and retrieves search results and aggregate data example: $result = Customer::all(); foreach($result as $transaction) { print_r($transaction->id); }
Наследование: implements Iterato\Iterator
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
__construct ( array $response, array $pager ) set up the resource collection
current ( ) returns the current item when iterating with foreach
firstItem ( ) : mixed returns the first item in the collection
getIds ( ) : array returns all IDs in the collection
key ( )
maximumCount ( )
next ( ) advances to the next item in the collection when iterating with foreach
rewind ( ) rewinds the testIterateOverResults collection to the first item when iterating with foreach
valid ( ) returns whether the current item is valid when iterating with foreach

Приватные методы

Метод Описание
_getNextPage ( )
_getPage ( $ids ) : void requests the next page of results for the collection

Описание методов

__construct() публичный Метод

expects an array of attributes with literal keys
public __construct ( array $response, array $pager )
$response array
$pager array

current() публичный Метод

returns the current item when iterating with foreach
public current ( )

firstItem() публичный Метод

returns the first item in the collection
public firstItem ( ) : mixed
Результат mixed

getIds() публичный Метод

returns all IDs in the collection
public getIds ( ) : array
Результат array

key() публичный Метод

public key ( )

maximumCount() публичный Метод

public maximumCount ( )

next() публичный Метод

advances to the next item in the collection when iterating with foreach
public next ( )

rewind() публичный Метод

rewinds the testIterateOverResults collection to the first item when iterating with foreach
public rewind ( )

valid() публичный Метод

returns whether the current item is valid when iterating with foreach
public valid ( )