{"action":"created","comment":{"url":"https://api.github.com/repos/KnpLabs/rad-resource-resolver/pulls/comments/39474507","id":39474507,"diff_hunk":"@@ -0,0 +1,52 @@\n+<?php\n+\n+namespace Knp\\Rad\\ResourceResolver\\Resolver;\n+\n+use Knp\\Rad\\ResourceResolver\\Resolver;\n+use Knp\\Rad\\ResourceResolver\\Resource;\n+\n+final class Container implements Resolver\n+{\n+    /**\n+     * @var Resolver[]\n+     */\n+    private $resolvers = [];\n+\n+    /**\n+     * @param Resolver $resolver\n+     *\n+     * @return Container\n+     */\n+    public function addResolver(Resolver $resolver)\n+    {\n+        $this->resolvers[] = $resolver;\n+\n+        return $this;\n+    }\n+\n+    /**\n+     * {@inheritdoc}\n+     */\n+    public function resolve(Resource $resource)\n+    {\n+        foreach ($this->resolvers AS $resolver) {\n+            if ($resolver->supports($resource)) {\n+                return $resolver->resolve($resource);\n+            }\n+        }\n+    }\n+\n+    /**\n+     * {@inheritdoc}\n+     */\n+    public function supports(Resource $resource)\n+    {\n+        foreach ($this->resolvers AS $resolver) {","path":"src/Knp/Rad/ResourceResolver/Resolver/Container.php","position":44,"original_position":44,"commit_id":"b021a8035c9a75556b390d452e9bada48cba6062","original_commit_id":"b021a8035c9a75556b390d452e9bada48cba6062","user":{"login":"PedroTroller","id":1766827,"avatar_url":"https://avatars.githubusercontent.com/u/1766827?v=3","gravatar_id":"","url":"https://api.github.com/users/PedroTroller","html_url":"https://github.com/PedroTroller","followers_url":"https://api.github.com/users/PedroTroller/followers","following_url":"https://api.github.com/users/PedroTroller/following{/other_user}","gists_url":"https://api.github.com/users/PedroTroller/gists{/gist_id}","starred_url":"https://api.github.com/users/PedroTroller/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PedroTroller/subscriptions","organizations_url":"https://api.github.com/users/PedroTroller/orgs","repos_url":"https://api.github.com/users/PedroTroller/repos","events_url":"https://api.github.com/users/PedroTroller/events{/privacy}","received_events_url":"https://api.github.com/users/PedroTroller/received_events","type":"User","site_admin":false},"body":"Same here","created_at":"2015-09-15T04:53:53Z","updated_at":"2015-09-15T04:53:53Z","html_url":"https://github.com/KnpLabs/rad-resource-resolver/pull/24#discussion_r39474507","pull_request_url":"https://api.github.com/repos/KnpLabs/rad-resource-resolver/pulls/24","_links":{"self":{"href":"https://api.github.com/repos/KnpLabs/rad-resource-resolver/pulls/comments/39474507"},"html":{"href":"https://github.com/KnpLabs/rad-resource-resolver/pull/24#discussion_r39474507"},"pull_request":{"href":"https://api.github.com/repos/KnpLabs/rad-resource-resolver/pulls/24"}}},"pull_request":{"url":"https://api.github.com/repos/KnpLabs/rad-resource-resolver/pulls/24","id":44882250,"html_url":"https://github.com/KnpLabs/rad-resource-resolver/pull/24","diff_url":"https://github.com/KnpLabs/rad-resource-resolver/pull/24.diff","patch_url":"https://github.com/KnpLabs/rad-resource-resolver/pull/24.patch","issue_url":"https://api.github.com/repos/KnpLabs/rad-resource-resolver/issues/24","number":24,"state":"open","locked":false,"title":"[WIP] v2.0","user":{"login":"NiR-","id":557933,"avatar_url":"https://avatars.githubusercontent.com/u/557933?v=3","gravatar_id":"","url":"https://api.github.com/users/NiR-","html_url":"https://github.com/NiR-","followers_url":"https://api.github.com/users/NiR-/followers","following_url":"https://api.github.com/users/NiR-/following{/other_user}","gists_url":"https://api.github.com/users/NiR-/gists{/gist_id}","starred_url":"https://api.github.com/users/NiR-/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NiR-/subscriptions","organizations_url":"https://api.github.com/users/NiR-/orgs","repos_url":"https://api.github.com/users/NiR-/repos","events_url":"https://api.github.com/users/NiR-/events{/privacy}","received_events_url":"https://api.github.com/users/NiR-/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-09-13T22:20:08Z","updated_at":"2015-09-15T04:53:53Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f5bb0e478d491229a6c94a1ac5556d51a067b03a","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/KnpLabs/rad-resource-resolver/pulls/24/commits","review_comments_url":"https://api.github.com/repos/KnpLabs/rad-resource-resolver/pulls/24/comments","review_comment_url":"https://api.github.com/repos/KnpLabs/rad-resource-resolver/pulls/comments{/number}","comments_url":"https://api.github.com/repos/KnpLabs/rad-resource-resolver/issues/24/comments","statuses_url":"https://api.github.com/repos/KnpLabs/rad-resource-resolver/statuses/b021a8035c9a75556b390d452e9bada48cba6062","head":{"label":"NiR-:2.0","ref":"2.0","sha":"b021a8035c9a75556b390d452e9bada48cba6062","user":{"login":"NiR-","id":557933,"avatar_url":"https://avatars.githubusercontent.com/u/557933?v=3","gravatar_id":"","url":"https://api.github.com/users/NiR-","html_url":"https://github.com/NiR-","followers_url":"https://api.github.com/users/NiR-/followers","following_url":"https://api.github.com/users/NiR-/following{/other_user}","gists_url":"https://api.github.com/users/NiR-/gists{/gist_id}","starred_url":"https://api.github.com/users/NiR-/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NiR-/subscriptions","organizations_url":"https://api.github.com/users/NiR-/orgs","repos_url":"https://api.github.com/users/NiR-/repos","events_url":"https://api.github.com/users/NiR-/events{/privacy}","received_events_url":"https://api.github.com/users/NiR-/received_events","type":"User","site_admin":false},"repo":{"id":41810830,"name":"rad-resource-resolver","full_name":"NiR-/rad-resource-resolver","owner":{"login":"NiR-","id":557933,"avatar_url":"https://avatars.githubusercontent.com/u/557933?v=3","gravatar_id":"","url":"https://api.github.com/users/NiR-","html_url":"https://github.com/NiR-","followers_url":"https://api.github.com/users/NiR-/followers","following_url":"https://api.github.com/users/NiR-/following{/other_user}","gists_url":"https://api.github.com/users/NiR-/gists{/gist_id}","starred_url":"https://api.github.com/users/NiR-/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NiR-/subscriptions","organizations_url":"https://api.github.com/users/NiR-/orgs","repos_url":"https://api.github.com/users/NiR-/repos","events_url":"https://api.github.com/users/NiR-/events{/privacy}","received_events_url":"https://api.github.com/users/NiR-/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/NiR-/rad-resource-resolver","description":"Knp Rad Resource Resolver","fork":true,"url":"https://api.github.com/repos/NiR-/rad-resource-resolver","forks_url":"https://api.github.com/repos/NiR-/rad-resource-resolver/forks","keys_url":"https://api.github.com/repos/NiR-/rad-resource-resolver/keys{/key_id}","collaborators_url":"https://api.github.com/repos/NiR-/rad-resource-resolver/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/NiR-/rad-resource-resolver/teams","hooks_url":"https://api.github.com/repos/NiR-/rad-resource-resolver/hooks","issue_events_url":"https://api.github.com/repos/NiR-/rad-resource-resolver/issues/events{/number}","events_url":"https://api.github.com/repos/NiR-/rad-resource-resolver/events","assignees_url":"https://api.github.com/repos/NiR-/rad-resource-resolver/assignees{/user}","branches_url":"https://api.github.com/repos/NiR-/rad-resource-resolver/branches{/branch}","tags_url":"https://api.github.com/repos/NiR-/rad-resource-resolver/tags","blobs_url":"https://api.github.com/repos/NiR-/rad-resource-resolver/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/NiR-/rad-resource-resolver/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/NiR-/rad-resource-resolver/git/refs{/sha}","trees_url":"https://api.github.com/repos/NiR-/rad-resource-resolver/git/trees{/sha}","statuses_url":"https://api.github.com/repos/NiR-/rad-resource-resolver/statuses/{sha}","languages_url":"https://api.github.com/repos/NiR-/rad-resource-resolver/languages","stargazers_url":"https://api.github.com/repos/NiR-/rad-resource-resolver/stargazers","contributors_url":"https://api.github.com/repos/NiR-/rad-resource-resolver/contributors","subscribers_url":"https://api.github.com/repos/NiR-/rad-resource-resolver/subscribers","subscription_url":"https://api.github.com/repos/NiR-/rad-resource-resolver/subscription","commits_url":"https://api.github.com/repos/NiR-/rad-resource-resolver/commits{/sha}","git_commits_url":"https://api.github.com/repos/NiR-/rad-resource-resolver/git/commits{/sha}","comments_url":"https://api.github.com/repos/NiR-/rad-resource-resolver/comments{/number}","issue_comment_url":"https://api.github.com/repos/NiR-/rad-resource-resolver/issues/comments{/number}","contents_url":"https://api.github.com/repos/NiR-/rad-resource-resolver/contents/{+path}","compare_url":"https://api.github.com/repos/NiR-/rad-resource-resolver/compare/{base}...{head}","merges_url":"https://api.github.com/repos/NiR-/rad-resource-resolver/merges","archive_url":"https://api.github.com/repos/NiR-/rad-resource-resolver/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/NiR-/rad-resource-resolver/downloads","issues_url":"https://api.github.com/repos/NiR-/rad-resource-resolver/issues{/number}","pulls_url":"https://api.github.com/repos/NiR-/rad-resource-resolver/pulls{/number}","milestones_url":"https://api.github.com/repos/NiR-/rad-resource-resolver/milestones{/number}","notifications_url":"https://api.github.com/repos/NiR-/rad-resource-resolver/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/NiR-/rad-resource-resolver/labels{/name}","releases_url":"https://api.github.com/repos/NiR-/rad-resource-resolver/releases{/id}","created_at":"2015-09-02T15:52:58Z","updated_at":"2015-09-02T15:52:58Z","pushed_at":"2015-09-14T08:58:32Z","git_url":"git://github.com/NiR-/rad-resource-resolver.git","ssh_url":"git@github.com:NiR-/rad-resource-resolver.git","clone_url":"https://github.com/NiR-/rad-resource-resolver.git","svn_url":"https://github.com/NiR-/rad-resource-resolver","homepage":null,"size":142,"stargazers_count":0,"watchers_count":0,"language":"PHP","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"KnpLabs:master","ref":"master","sha":"66207511882b8f6b8c012be103fc42b41a66d534","user":{"login":"KnpLabs","id":202732,"avatar_url":"https://avatars.githubusercontent.com/u/202732?v=3","gravatar_id":"","url":"https://api.github.com/users/KnpLabs","html_url":"https://github.com/KnpLabs","followers_url":"https://api.github.com/users/KnpLabs/followers","following_url":"https://api.github.com/users/KnpLabs/following{/other_user}","gists_url":"https://api.github.com/users/KnpLabs/gists{/gist_id}","starred_url":"https://api.github.com/users/KnpLabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/KnpLabs/subscriptions","organizations_url":"https://api.github.com/users/KnpLabs/orgs","repos_url":"https://api.github.com/users/KnpLabs/repos","events_url":"https://api.github.com/users/KnpLabs/events{/privacy}","received_events_url":"https://api.github.com/users/KnpLabs/received_events","type":"Organization","site_admin":false},"repo":{"id":29920472,"name":"rad-resource-resolver","full_name":"KnpLabs/rad-resource-resolver","owner":{"login":"KnpLabs","id":202732,"avatar_url":"https://avatars.githubusercontent.com/u/202732?v=3","gravatar_id":"","url":"https://api.github.com/users/KnpLabs","html_url":"https://github.com/KnpLabs","followers_url":"https://api.github.com/users/KnpLabs/followers","following_url":"https://api.github.com/users/KnpLabs/following{/other_user}","gists_url":"https://api.github.com/users/KnpLabs/gists{/gist_id}","starred_url":"https://api.github.com/users/KnpLabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/KnpLabs/subscriptions","organizations_url":"https://api.github.com/users/KnpLabs/orgs","repos_url":"https://api.github.com/users/KnpLabs/repos","events_url":"https://api.github.com/users/KnpLabs/events{/privacy}","received_events_url":"https://api.github.com/users/KnpLabs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/KnpLabs/rad-resource-resolver","description":"Knp Rad Resource Resolver","fork":false,"url":"https://api.github.com/repos/KnpLabs/rad-resource-resolver","forks_url":"https://api.github.com/repos/KnpLabs/rad-resource-resolver/forks","keys_url":"https://api.github.com/repos/KnpLabs/rad-resource-resolver/keys{/key_id}","collaborators_url":"https://api.github.com/repos/KnpLabs/rad-resource-resolver/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/KnpLabs/rad-resource-resolver/teams","hooks_url":"https://api.github.com/repos/KnpLabs/rad-resource-resolver/hooks","issue_events_url":"https://api.github.com/repos/KnpLabs/rad-resource-resolver/issues/events{/number}","events_url":"https://api.github.com/repos/KnpLabs/rad-resource-resolver/events","assignees_url":"https://api.github.com/repos/KnpLabs/rad-resource-resolver/assignees{/user}","branches_url":"https://api.github.com/repos/KnpLabs/rad-resource-resolver/branches{/branch}","tags_url":"https://api.github.com/repos/KnpLabs/rad-resource-resolver/tags","blobs_url":"https://api.github.com/repos/KnpLabs/rad-resource-resolver/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/KnpLabs/rad-resource-resolver/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/KnpLabs/rad-resource-resolver/git/refs{/sha}","trees_url":"https://api.github.com/repos/KnpLabs/rad-resource-resolver/git/trees{/sha}","statuses_url":"https://api.github.com/repos/KnpLabs/rad-resource-resolver/statuses/{sha}","languages_url":"https://api.github.com/repos/KnpLabs/rad-resource-resolver/languages","stargazers_url":"https://api.github.com/repos/KnpLabs/rad-resource-resolver/stargazers","contributors_url":"https://api.github.com/repos/KnpLabs/rad-resource-resolver/contributors","subscribers_url":"https://api.github.com/repos/KnpLabs/rad-resource-resolver/subscribers","subscription_url":"https://api.github.com/repos/KnpLabs/rad-resource-resolver/subscription","commits_url":"https://api.github.com/repos/KnpLabs/rad-resource-resolver/commits{/sha}","git_commits_url":"https://api.github.com/repos/KnpLabs/rad-resource-resolver/git/commits{/sha}","comments_url":"https://api.github.com/repos/KnpLabs/rad-resource-resolver/comments{/number}","issue_comment_url":"https://api.github.com/repos/KnpLabs/rad-resource-resolver/issues/comments{/number}","contents_url":"https://api.github.com/repos/KnpLabs/rad-resource-resolver/contents/{+path}","compare_url":"https://api.github.com/repos/KnpLabs/rad-resource-resolver/compare/{base}...{head}","merges_url":"https://api.github.com/repos/KnpLabs/rad-resource-resolver/merges","archive_url":"https://api.github.com/repos/KnpLabs/rad-resource-resolver/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/KnpLabs/rad-resource-resolver/downloads","issues_url":"https://api.github.com/repos/KnpLabs/rad-resource-resolver/issues{/number}","pulls_url":"https://api.github.com/repos/KnpLabs/rad-resource-resolver/pulls{/number}","milestones_url":"https://api.github.com/repos/KnpLabs/rad-resource-resolver/milestones{/number}","notifications_url":"https://api.github.com/repos/KnpLabs/rad-resource-resolver/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/KnpLabs/rad-resource-resolver/labels{/name}","releases_url":"https://api.github.com/repos/KnpLabs/rad-resource-resolver/releases{/id}","created_at":"2015-01-27T15:34:57Z","updated_at":"2015-03-18T15:41:24Z","pushed_at":"2015-09-13T23:03:05Z","git_url":"git://github.com/KnpLabs/rad-resource-resolver.git","ssh_url":"git@github.com:KnpLabs/rad-resource-resolver.git","clone_url":"https://github.com/KnpLabs/rad-resource-resolver.git","svn_url":"https://github.com/KnpLabs/rad-resource-resolver","homepage":null,"size":505,"stargazers_count":2,"watchers_count":2,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":3,"forks":1,"open_issues":3,"watchers":2,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/KnpLabs/rad-resource-resolver/pulls/24"},"html":{"href":"https://github.com/KnpLabs/rad-resource-resolver/pull/24"},"issue":{"href":"https://api.github.com/repos/KnpLabs/rad-resource-resolver/issues/24"},"comments":{"href":"https://api.github.com/repos/KnpLabs/rad-resource-resolver/issues/24/comments"},"review_comments":{"href":"https://api.github.com/repos/KnpLabs/rad-resource-resolver/pulls/24/comments"},"review_comment":{"href":"https://api.github.com/repos/KnpLabs/rad-resource-resolver/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/KnpLabs/rad-resource-resolver/pulls/24/commits"},"statuses":{"href":"https://api.github.com/repos/KnpLabs/rad-resource-resolver/statuses/b021a8035c9a75556b390d452e9bada48cba6062"}}}}