namespace seekat\API;
+use http\Url;
+use Iterator as BaseIterator;
use seekat\API;
-class Iterator implements \Iterator
+class Iterator implements BaseIterator
{
/**
* The endpoint
- * @var \seekat\API
+ * @var API
*/
private $api;
/**
* Create a new iterator over $data returning \seekat\API instances
*
- * @var \seekat\API $api The endpoint
+ * @var API $api The endpoint
* @var array|object $data
*/
function __construct(API $api) {
/**
* Get the current data entry
*
- * @return \seekat\API
+ * @return API
*/
function current() {
return $this->cur;
if (list($key, $cur) = each($this->data)) {
$this->key = $key;
if ($this->api->$key->exists("url", $url)) {
- $url = new \http\Url($url);
+ $url = new Url($url);
$this->cur = $this->api->withUrl($url)->withData($cur);
} else {
$this->cur = $this->api->$key->withData($cur);