{"action":"opened","issue":{"url":"https://api.github.com/repos/FastFeed/FastFeed/issues/17","labels_url":"https://api.github.com/repos/FastFeed/FastFeed/issues/17/labels{/name}","comments_url":"https://api.github.com/repos/FastFeed/FastFeed/issues/17/comments","events_url":"https://api.github.com/repos/FastFeed/FastFeed/issues/17/events","html_url":"https://github.com/FastFeed/FastFeed/issues/17","id":64237795,"number":17,"title":"Retrieve Feed properties ","user":{"login":"desarrolla2","id":661529,"avatar_url":"https://avatars.githubusercontent.com/u/661529?v=3","gravatar_id":"","url":"https://api.github.com/users/desarrolla2","html_url":"https://github.com/desarrolla2","followers_url":"https://api.github.com/users/desarrolla2/followers","following_url":"https://api.github.com/users/desarrolla2/following{/other_user}","gists_url":"https://api.github.com/users/desarrolla2/gists{/gist_id}","starred_url":"https://api.github.com/users/desarrolla2/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/desarrolla2/subscriptions","organizations_url":"https://api.github.com/users/desarrolla2/orgs","repos_url":"https://api.github.com/users/desarrolla2/repos","events_url":"https://api.github.com/users/desarrolla2/events{/privacy}","received_events_url":"https://api.github.com/users/desarrolla2/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-03-25T10:29:50Z","updated_at":"2015-03-25T10:29:50Z","closed_at":null,"body":"Actual implementation dont care about feed properties, title, description, etc.\r\n\r\nthe current usage is:\r\n\r\n```php\r\n$items = $fastFeed->fetch('default');\r\nforeach ($items as $item) {\r\n    echo '<h1>' . $item->getName() . '</h1>' . PHP_EOL;\r\n}\r\n```\r\n\r\nI was thinking to change for something like this.\r\n\r\n```php\r\n$feed = $fastFeed->fetch('default');\r\necho '<h1>' . $feed->getName() . '</h1>' . PHP_EOL;\r\nforeach ($feed as $item) {\r\n    echo '<h2>' . $item->getName() . '</h2>' . PHP_EOL;\r\n}\r\n```\r\n\r\nSo, it not break BC, although it has recently been broken when we change the http client.\r\n\r\nTo do this I will use a new feed class that implements \\ArrayAccess, \\Countable and \\Iterator and change the api:\r\n\r\ncurrent:\r\n```php\r\n    /**\r\n     * @param string $channel\r\n     *\r\n     * @return Item[]\r\n     * @throws Exception\\LogicException\r\n     */\r\n    public function fetch($channel = 'default');\r\n```\r\n\r\nafter:\r\n```php\r\n    /**\r\n     * @param string $channel\r\n     *\r\n     * @return Feed\r\n     * @throws Exception\\LogicException\r\n     */\r\n    public function fetch($channel = 'default');\r\n```\r\n\r\nWhat do you think @jadb?"}}