mirror of
https://github.com/guzzle/guzzle.git
synced 2025-02-27 11:32:30 +01:00
27 lines
770 B
PHP
27 lines
770 B
PHP
<?php
|
|
/**
|
|
* @package Guzzle PHP <http://www.guzzlephp.org>
|
|
* @license See the LICENSE file that was distributed with this source code.
|
|
*/
|
|
|
|
namespace Guzzle\Tests\Service\Mock;
|
|
|
|
use Guzzle\Service\ResourceIterator;
|
|
|
|
/**
|
|
* @author Michael Dowling <michael@guzzlephp.org>
|
|
*/
|
|
class MockResourceIterator extends ResourceIterator
|
|
{
|
|
protected function sendRequest()
|
|
{
|
|
$request = $this->client->createRequest();
|
|
$request->getQuery()->set('count', $this->calculatePageSize());
|
|
$data = json_decode($request->send()->getBody(true), true);
|
|
|
|
$this->resourceList = $data['resources'];
|
|
$this->nextToken = $data['next_token'];
|
|
$this->retrievedCount += count($this->data['resources']);
|
|
$this->currentIndex = 0;
|
|
}
|
|
} |