{"action":"created","issue":{"url":"https://api.github.com/repos/nozavroni/collections/issues/18","repository_url":"https://api.github.com/repos/nozavroni/collections","labels_url":"https://api.github.com/repos/nozavroni/collections/issues/18/labels{/name}","comments_url":"https://api.github.com/repos/nozavroni/collections/issues/18/comments","events_url":"https://api.github.com/repos/nozavroni/collections/issues/18/events","html_url":"https://github.com/nozavroni/collections/issues/18","id":197552014,"number":18,"title":"Add ObjectCollection","user":{"login":"nozavroni","id":48611,"avatar_url":"https://avatars.githubusercontent.com/u/48611?v=3","gravatar_id":"","url":"https://api.github.com/users/nozavroni","html_url":"https://github.com/nozavroni","followers_url":"https://api.github.com/users/nozavroni/followers","following_url":"https://api.github.com/users/nozavroni/following{/other_user}","gists_url":"https://api.github.com/users/nozavroni/gists{/gist_id}","starred_url":"https://api.github.com/users/nozavroni/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nozavroni/subscriptions","organizations_url":"https://api.github.com/users/nozavroni/orgs","repos_url":"https://api.github.com/users/nozavroni/repos","events_url":"https://api.github.com/users/nozavroni/events{/privacy}","received_events_url":"https://api.github.com/users/nozavroni/received_events","type":"User","site_admin":false},"labels":[{"id":506720035,"url":"https://api.github.com/repos/nozavroni/collections/labels/feature","name":"feature","color":"84b6eb","default":false}],"state":"closed","locked":false,"assignee":{"login":"nozavroni","id":48611,"avatar_url":"https://avatars.githubusercontent.com/u/48611?v=3","gravatar_id":"","url":"https://api.github.com/users/nozavroni","html_url":"https://github.com/nozavroni","followers_url":"https://api.github.com/users/nozavroni/followers","following_url":"https://api.github.com/users/nozavroni/following{/other_user}","gists_url":"https://api.github.com/users/nozavroni/gists{/gist_id}","starred_url":"https://api.github.com/users/nozavroni/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nozavroni/subscriptions","organizations_url":"https://api.github.com/users/nozavroni/orgs","repos_url":"https://api.github.com/users/nozavroni/repos","events_url":"https://api.github.com/users/nozavroni/events{/privacy}","received_events_url":"https://api.github.com/users/nozavroni/received_events","type":"User","site_admin":false},"assignees":[{"login":"nozavroni","id":48611,"avatar_url":"https://avatars.githubusercontent.com/u/48611?v=3","gravatar_id":"","url":"https://api.github.com/users/nozavroni","html_url":"https://github.com/nozavroni","followers_url":"https://api.github.com/users/nozavroni/followers","following_url":"https://api.github.com/users/nozavroni/following{/other_user}","gists_url":"https://api.github.com/users/nozavroni/gists{/gist_id}","starred_url":"https://api.github.com/users/nozavroni/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nozavroni/subscriptions","organizations_url":"https://api.github.com/users/nozavroni/orgs","repos_url":"https://api.github.com/users/nozavroni/repos","events_url":"https://api.github.com/users/nozavroni/events{/privacy}","received_events_url":"https://api.github.com/users/nozavroni/received_events","type":"User","site_admin":false}],"milestone":{"url":"https://api.github.com/repos/nozavroni/collections/milestones/1","html_url":"https://github.com/nozavroni/collections/milestone/1","labels_url":"https://api.github.com/repos/nozavroni/collections/milestones/1/labels","id":2214751,"number":1,"title":"v0.1 Release","description":"Initial release","creator":{"login":"nozavroni","id":48611,"avatar_url":"https://avatars.githubusercontent.com/u/48611?v=3","gravatar_id":"","url":"https://api.github.com/users/nozavroni","html_url":"https://github.com/nozavroni","followers_url":"https://api.github.com/users/nozavroni/followers","following_url":"https://api.github.com/users/nozavroni/following{/other_user}","gists_url":"https://api.github.com/users/nozavroni/gists{/gist_id}","starred_url":"https://api.github.com/users/nozavroni/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nozavroni/subscriptions","organizations_url":"https://api.github.com/users/nozavroni/orgs","repos_url":"https://api.github.com/users/nozavroni/repos","events_url":"https://api.github.com/users/nozavroni/events{/privacy}","received_events_url":"https://api.github.com/users/nozavroni/received_events","type":"User","site_admin":false},"open_issues":6,"closed_issues":9,"state":"open","created_at":"2016-12-25T09:34:35Z","updated_at":"2016-12-27T08:28:53Z","due_on":"2016-12-27T08:00:00Z","closed_at":null},"comments":2,"created_at":"2016-12-26T07:47:25Z","updated_at":"2016-12-27T08:28:53Z","closed_at":"2016-12-27T08:28:53Z","body":"Add a new collection type that holds only objects. Maybe even a more specific object collection that only holds objects of a given type. So you could do something like: \r\n\r\n```php\r\n$objects = new ObjectCollection();\r\n$objects->push(new stdClass);\r\n$objects->push(new Foo(['bar' => 'baz']));\r\n$objects->add(new ArrayIterator([1,2,3,4,5]));\r\n$objects->add(new NumericCollection([5,4,3,2,1]));\r\n```\r\n\r\nAnd then if you wanted to only be able to store objects of a specific type, you could do... \r\n\r\n```php\r\n$objects = new ObjectCollection();\r\n$objects->allowOnly(Iterator); // now it only allows objects of type \"Iterator\"\r\n```\r\n\r\nAlthough I'm not in love with this interface... think about it..."},"comment":{"url":"https://api.github.com/repos/nozavroni/collections/issues/comments/269292588","html_url":"https://github.com/nozavroni/collections/issues/18#issuecomment-269292588","issue_url":"https://api.github.com/repos/nozavroni/collections/issues/18","id":269292588,"user":{"login":"nozavroni","id":48611,"avatar_url":"https://avatars.githubusercontent.com/u/48611?v=3","gravatar_id":"","url":"https://api.github.com/users/nozavroni","html_url":"https://github.com/nozavroni","followers_url":"https://api.github.com/users/nozavroni/followers","following_url":"https://api.github.com/users/nozavroni/following{/other_user}","gists_url":"https://api.github.com/users/nozavroni/gists{/gist_id}","starred_url":"https://api.github.com/users/nozavroni/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nozavroni/subscriptions","organizations_url":"https://api.github.com/users/nozavroni/orgs","repos_url":"https://api.github.com/users/nozavroni/repos","events_url":"https://api.github.com/users/nozavroni/events{/privacy}","received_events_url":"https://api.github.com/users/nozavroni/received_events","type":"User","site_admin":false},"created_at":"2016-12-27T08:28:53Z","updated_at":"2016-12-27T08:28:53Z","body":"See referenced pull request "}}
{"actor":{"display_login":"nozavroni"}}