| 1 | <?php |
||
| 10 | class ServiceReader implements CountableReaderInterface |
||
| 11 | { |
||
| 12 | /** |
||
| 13 | * @var \Iterator |
||
| 14 | */ |
||
| 15 | protected $iterableResult; |
||
| 16 | |||
| 17 | /** |
||
| 18 | * @var callable |
||
| 19 | */ |
||
| 20 | private $callable; |
||
| 21 | |||
| 22 | /** |
||
| 23 | * @var array |
||
| 24 | */ |
||
| 25 | private $arguments; |
||
| 26 | |||
| 27 | 3 | public function __construct(callable $callable, array $arguments = array()) |
|
| 36 | |||
| 37 | /** |
||
| 38 | * {@inheritdoc} |
||
| 39 | */ |
||
| 40 | 1 | public function getFields() |
|
| 44 | |||
| 45 | /** |
||
| 46 | * {@inheritdoc} |
||
| 47 | */ |
||
| 48 | 2 | public function current() |
|
| 56 | |||
| 57 | /** |
||
| 58 | * {@inheritdoc} |
||
| 59 | */ |
||
| 60 | 2 | public function next() |
|
| 64 | |||
| 65 | /** |
||
| 66 | * {@inheritdoc} |
||
| 67 | */ |
||
| 68 | 1 | public function key() |
|
| 72 | |||
| 73 | /** |
||
| 74 | * {@inheritdoc} |
||
| 75 | */ |
||
| 76 | 2 | public function valid() |
|
| 80 | |||
| 81 | /** |
||
| 82 | * {@inheritdoc} |
||
| 83 | */ |
||
| 84 | 3 | public function rewind() |
|
| 92 | |||
| 93 | /** |
||
| 94 | * {@inheritdoc} |
||
| 95 | */ |
||
| 96 | 2 | public function count() |
|
| 104 | |||
| 105 | 3 | private function getDataFromService() |
|
| 109 | } |
||
| 110 |