PATH:
home
/
lab2454c
/
crypto.keyreum.com
/
vendor
/
mollie
/
mollie-api-php
/
src
/
Resources
<?php namespace Mollie\Api\Resources; use Mollie\Api\MollieApiClient; abstract class CursorCollection extends BaseCollection { /** * @var MollieApiClient */ protected $client; /** * @param MollieApiClient $client * @param int $count * @param \stdClass $_links */ final public function __construct(MollieApiClient $client, $count, $_links) { parent::__construct($count, $_links); $this->client = $client; } /** * @return BaseResource */ abstract protected function createResourceObject(); /** * Return the next set of resources when available * * @return CursorCollection|null * @throws \Mollie\Api\Exceptions\ApiException */ final public function next() { if (! $this->hasNext()) { return null; } $result = $this->client->performHttpCallToFullUrl(MollieApiClient::HTTP_GET, $this->_links->next->href); $collection = new static($this->client, $result->count, $result->_links); foreach ($result->_embedded->{$collection->getCollectionResourceName()} as $dataResult) { $collection[] = ResourceFactory::createFromApiResult($dataResult, $this->createResourceObject()); } return $collection; } /** * Return the previous set of resources when available * * @return CursorCollection|null * @throws \Mollie\Api\Exceptions\ApiException */ final public function previous() { if (! $this->hasPrevious()) { return null; } $result = $this->client->performHttpCallToFullUrl(MollieApiClient::HTTP_GET, $this->_links->previous->href); $collection = new static($this->client, $result->count, $result->_links); foreach ($result->_embedded->{$collection->getCollectionResourceName()} as $dataResult) { $collection[] = ResourceFactory::createFromApiResult($dataResult, $this->createResourceObject()); } return $collection; } /** * Determine whether the collection has a next page available. * * @return bool */ public function hasNext() { return isset($this->_links->next->href); } /** * Determine whether the collection has a previous page available. * * @return bool */ public function hasPrevious() { return isset($this->_links->previous->href); } }
[-] CurrentProfile.php
[edit]
[-] OrganizationCollection.php
[edit]
[-] SubscriptionCollection.php
[edit]
[+]
..
[-] Permission.php
[edit]
[-] MethodPrice.php
[edit]
[-] Settlement.php
[edit]
[-] CursorCollection.php
[edit]
[-] CustomerCollection.php
[edit]
[-] RefundCollection.php
[edit]
[-] Refund.php
[edit]
[-] CaptureCollection.php
[edit]
[-] Method.php
[edit]
[-] Order.php
[edit]
[-] Subscription.php
[edit]
[-] PaymentLink.php
[edit]
[-] BaseResource.php
[edit]
[-] Onboarding.php
[edit]
[-] BaseCollection.php
[edit]
[-] Customer.php
[edit]
[-] OrderLine.php
[edit]
[-] Profile.php
[edit]
[-] Issuer.php
[edit]
[-] Mandate.php
[edit]
[-] ShipmentCollection.php
[edit]
[-] IssuerCollection.php
[edit]
[-] PermissionCollection.php
[edit]
[-] InvoiceCollection.php
[edit]
[-] Capture.php
[edit]
[-] MethodCollection.php
[edit]
[-] PaymentCollection.php
[edit]
[-] PaymentLinkCollection.php
[edit]
[-] OrderCollection.php
[edit]
[-] ResourceFactory.php
[edit]
[-] MandateCollection.php
[edit]
[-] ChargebackCollection.php
[edit]
[-] Payment.php
[edit]
[-] Organization.php
[edit]
[-] Invoice.php
[edit]
[-] ProfileCollection.php
[edit]
[-] OrderLineCollection.php
[edit]
[-] MethodPriceCollection.php
[edit]
[-] Chargeback.php
[edit]
[-] Shipment.php
[edit]
[-] SettlementCollection.php
[edit]