6 use Iterator
as BaseIterator
;
9 class Iterator
implements BaseIterator
30 * The current data entry
36 * Create a new iterator over $data returning \seekat\API instances
38 * @var API $api The endpoint
39 * @var array|object $data
41 function __construct(API
$api) {
43 $this->data
= (array) $api->export()["data"];
56 * Get the current data entry
65 if (list($key, $cur) = each($this->data
)) {
67 if ($this->api
->$key->exists("url", $url)) {
69 $this->cur
= $this->api
->withUrl($url)->withData($cur);
71 $this->cur
= $this->api
->$key->withData($cur);
80 return isset($this->cur
);
84 if (is_array($this->data
)) {