Файл: vkolhoze.com/vendor/guzzle/guzzle/tests/Guzzle/Tests/Service/Mock/Model/MockCommandIterator.php
Строк: 38
<?php
namespace GuzzleTestsServiceMockModel;
use GuzzleServiceResourceResourceIterator;
class MockCommandIterator extends ResourceIterator
{
public $calledNext = 0;
protected function sendRequest()
{
if ($this->nextToken) {
$this->command->set('next_token', $this->nextToken);
}
$this->command->set('page_size', (int) $this->calculatePageSize());
$this->command->execute();
$data = json_decode($this->command->getResponse()->getBody(true), true);
$this->nextToken = $data['next_token'];
return $data['resources'];
}
public function next()
{
$this->calledNext++;
parent::next();
}
public function getResources()
{
return $this->resources;
}
public function getIteratedCount()
{
return $this->iteratedCount;
}
}