items = array(); foreach ($sourceArray['items'] as $paymentInfo) { $payment = new PaymentResponse($paymentInfo); $this->items[] = $payment; } if (!empty($sourceArray['next_cursor'])) { $this->nextCursor = $sourceArray['next_cursor']; } } /** * Возвращает список платежей * @return PaymentInterface[] Список платежей */ public function getItems() { return $this->items; } /** * Возвращает токен следующей страницы, если он задан, или null * @return string|null Токен следующей страницы */ public function getNextCursor() { return $this->nextCursor; } /** * Проверяет имееотся ли в ответе токен следующей страницы * @return bool True если токен следующей страницы есть, false если нет */ public function hasNextCursor() { return $this->nextCursor !== null; } }