{"action":"created","comment":{"url":"https://api.github.com/repos/zendframework/zend-servicemanager/pulls/comments/76059707","id":76059707,"diff_hunk":"@@ -0,0 +1,64 @@\n+<?php\n+/**\n+ * Zend Framework (http://framework.zend.com/)\n+ *\n+ * @link      http://github.com/zendframework/zf2 for the canonical source repository\n+ * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)\n+ * @license   http://framework.zend.com/license/new-bsd New BSD License\n+ */\n+\n+namespace Zend\\ServiceManager\\AbstractFactory;\n+\n+use Zend\\ServiceManager\\Factory\\AbstractFactoryInterface;\n+\n+class ConfigAbstractFactory implements AbstractFactoryInterface\n+{\n+\n+    /**\n+     * Can the factory create an instance for the service?\n+     *\n+     * @param  \\Interop\\Container\\ContainerInterface $container\n+     * @param  string $requestedName\n+     * @return bool\n+     */\n+    public function canCreate(\\Interop\\Container\\ContainerInterface $container, $requestedName)\n+    {\n+        if (!$container->has('config') || !array_key_exists(self::class, $container->get('config'))) {\n+            return false;\n+        }\n+        $config = $container->get('config');\n+        $dependencies = $config[self::class];\n+\n+        return array_key_exists($requestedName, $dependencies);","path":"src/AbstractFactory/ConfigAbstractFactory.php","position":32,"original_position":32,"commit_id":"ab3e329233f5719310814423143e841634719b4d","original_commit_id":"ab3e329233f5719310814423143e841634719b4d","user":{"login":"Ocramius","id":154256,"avatar_url":"https://avatars.githubusercontent.com/u/154256?v=3","gravatar_id":"","url":"https://api.github.com/users/Ocramius","html_url":"https://github.com/Ocramius","followers_url":"https://api.github.com/users/Ocramius/followers","following_url":"https://api.github.com/users/Ocramius/following{/other_user}","gists_url":"https://api.github.com/users/Ocramius/gists{/gist_id}","starred_url":"https://api.github.com/users/Ocramius/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Ocramius/subscriptions","organizations_url":"https://api.github.com/users/Ocramius/orgs","repos_url":"https://api.github.com/users/Ocramius/repos","events_url":"https://api.github.com/users/Ocramius/events{/privacy}","received_events_url":"https://api.github.com/users/Ocramius/received_events","type":"User","site_admin":false},"body":"You also want to check if the dependencies list is an `array`","created_at":"2016-08-24T13:52:06Z","updated_at":"2016-08-24T13:52:06Z","html_url":"https://github.com/zendframework/zend-servicemanager/pull/143#discussion_r76059707","pull_request_url":"https://api.github.com/repos/zendframework/zend-servicemanager/pulls/143","_links":{"self":{"href":"https://api.github.com/repos/zendframework/zend-servicemanager/pulls/comments/76059707"},"html":{"href":"https://github.com/zendframework/zend-servicemanager/pull/143#discussion_r76059707"},"pull_request":{"href":"https://api.github.com/repos/zendframework/zend-servicemanager/pulls/143"}}},"pull_request":{"url":"https://api.github.com/repos/zendframework/zend-servicemanager/pulls/143","id":82515122,"html_url":"https://github.com/zendframework/zend-servicemanager/pull/143","diff_url":"https://github.com/zendframework/zend-servicemanager/pull/143.diff","patch_url":"https://github.com/zendframework/zend-servicemanager/pull/143.patch","issue_url":"https://api.github.com/repos/zendframework/zend-servicemanager/issues/143","number":143,"state":"open","locked":false,"title":"Added new ConfigAbstractFactory per issue #128","user":{"login":"GeeH","id":613376,"avatar_url":"https://avatars.githubusercontent.com/u/613376?v=3","gravatar_id":"","url":"https://api.github.com/users/GeeH","html_url":"https://github.com/GeeH","followers_url":"https://api.github.com/users/GeeH/followers","following_url":"https://api.github.com/users/GeeH/following{/other_user}","gists_url":"https://api.github.com/users/GeeH/gists{/gist_id}","starred_url":"https://api.github.com/users/GeeH/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GeeH/subscriptions","organizations_url":"https://api.github.com/users/GeeH/orgs","repos_url":"https://api.github.com/users/GeeH/repos","events_url":"https://api.github.com/users/GeeH/events{/privacy}","received_events_url":"https://api.github.com/users/GeeH/received_events","type":"User","site_admin":false},"body":"Configurable abstract factory allows creation of services via config key, see tests for usage.\r\n\r\nFeedback greatfully received.","created_at":"2016-08-24T10:07:48Z","updated_at":"2016-08-24T13:52:06Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f3ae821acbab21076b3aa0a1ca81409e9dbd5a24","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/zendframework/zend-servicemanager/pulls/143/commits","review_comments_url":"https://api.github.com/repos/zendframework/zend-servicemanager/pulls/143/comments","review_comment_url":"https://api.github.com/repos/zendframework/zend-servicemanager/pulls/comments{/number}","comments_url":"https://api.github.com/repos/zendframework/zend-servicemanager/issues/143/comments","statuses_url":"https://api.github.com/repos/zendframework/zend-servicemanager/statuses/ab3e329233f5719310814423143e841634719b4d","head":{"label":"GeeH:feature/config-abstract-factory","ref":"feature/config-abstract-factory","sha":"ab3e329233f5719310814423143e841634719b4d","user":{"login":"GeeH","id":613376,"avatar_url":"https://avatars.githubusercontent.com/u/613376?v=3","gravatar_id":"","url":"https://api.github.com/users/GeeH","html_url":"https://github.com/GeeH","followers_url":"https://api.github.com/users/GeeH/followers","following_url":"https://api.github.com/users/GeeH/following{/other_user}","gists_url":"https://api.github.com/users/GeeH/gists{/gist_id}","starred_url":"https://api.github.com/users/GeeH/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GeeH/subscriptions","organizations_url":"https://api.github.com/users/GeeH/orgs","repos_url":"https://api.github.com/users/GeeH/repos","events_url":"https://api.github.com/users/GeeH/events{/privacy}","received_events_url":"https://api.github.com/users/GeeH/received_events","type":"User","site_admin":false},"repo":{"id":64298634,"name":"zend-servicemanager","full_name":"GeeH/zend-servicemanager","owner":{"login":"GeeH","id":613376,"avatar_url":"https://avatars.githubusercontent.com/u/613376?v=3","gravatar_id":"","url":"https://api.github.com/users/GeeH","html_url":"https://github.com/GeeH","followers_url":"https://api.github.com/users/GeeH/followers","following_url":"https://api.github.com/users/GeeH/following{/other_user}","gists_url":"https://api.github.com/users/GeeH/gists{/gist_id}","starred_url":"https://api.github.com/users/GeeH/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GeeH/subscriptions","organizations_url":"https://api.github.com/users/GeeH/orgs","repos_url":"https://api.github.com/users/GeeH/repos","events_url":"https://api.github.com/users/GeeH/events{/privacy}","received_events_url":"https://api.github.com/users/GeeH/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/GeeH/zend-servicemanager","description":"ServiceManager component from Zend Framework","fork":true,"url":"https://api.github.com/repos/GeeH/zend-servicemanager","forks_url":"https://api.github.com/repos/GeeH/zend-servicemanager/forks","keys_url":"https://api.github.com/repos/GeeH/zend-servicemanager/keys{/key_id}","collaborators_url":"https://api.github.com/repos/GeeH/zend-servicemanager/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/GeeH/zend-servicemanager/teams","hooks_url":"https://api.github.com/repos/GeeH/zend-servicemanager/hooks","issue_events_url":"https://api.github.com/repos/GeeH/zend-servicemanager/issues/events{/number}","events_url":"https://api.github.com/repos/GeeH/zend-servicemanager/events","assignees_url":"https://api.github.com/repos/GeeH/zend-servicemanager/assignees{/user}","branches_url":"https://api.github.com/repos/GeeH/zend-servicemanager/branches{/branch}","tags_url":"https://api.github.com/repos/GeeH/zend-servicemanager/tags","blobs_url":"https://api.github.com/repos/GeeH/zend-servicemanager/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/GeeH/zend-servicemanager/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/GeeH/zend-servicemanager/git/refs{/sha}","trees_url":"https://api.github.com/repos/GeeH/zend-servicemanager/git/trees{/sha}","statuses_url":"https://api.github.com/repos/GeeH/zend-servicemanager/statuses/{sha}","languages_url":"https://api.github.com/repos/GeeH/zend-servicemanager/languages","stargazers_url":"https://api.github.com/repos/GeeH/zend-servicemanager/stargazers","contributors_url":"https://api.github.com/repos/GeeH/zend-servicemanager/contributors","subscribers_url":"https://api.github.com/repos/GeeH/zend-servicemanager/subscribers","subscription_url":"https://api.github.com/repos/GeeH/zend-servicemanager/subscription","commits_url":"https://api.github.com/repos/GeeH/zend-servicemanager/commits{/sha}","git_commits_url":"https://api.github.com/repos/GeeH/zend-servicemanager/git/commits{/sha}","comments_url":"https://api.github.com/repos/GeeH/zend-servicemanager/comments{/number}","issue_comment_url":"https://api.github.com/repos/GeeH/zend-servicemanager/issues/comments{/number}","contents_url":"https://api.github.com/repos/GeeH/zend-servicemanager/contents/{+path}","compare_url":"https://api.github.com/repos/GeeH/zend-servicemanager/compare/{base}...{head}","merges_url":"https://api.github.com/repos/GeeH/zend-servicemanager/merges","archive_url":"https://api.github.com/repos/GeeH/zend-servicemanager/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/GeeH/zend-servicemanager/downloads","issues_url":"https://api.github.com/repos/GeeH/zend-servicemanager/issues{/number}","pulls_url":"https://api.github.com/repos/GeeH/zend-servicemanager/pulls{/number}","milestones_url":"https://api.github.com/repos/GeeH/zend-servicemanager/milestones{/number}","notifications_url":"https://api.github.com/repos/GeeH/zend-servicemanager/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/GeeH/zend-servicemanager/labels{/name}","releases_url":"https://api.github.com/repos/GeeH/zend-servicemanager/releases{/id}","deployments_url":"https://api.github.com/repos/GeeH/zend-servicemanager/deployments","created_at":"2016-07-27T10:11:16Z","updated_at":"2016-07-27T10:11:17Z","pushed_at":"2016-08-24T10:51:39Z","git_url":"git://github.com/GeeH/zend-servicemanager.git","ssh_url":"git@github.com:GeeH/zend-servicemanager.git","clone_url":"https://github.com/GeeH/zend-servicemanager.git","svn_url":"https://github.com/GeeH/zend-servicemanager","homepage":"https://github.com/zendframework/zf2","size":2814,"stargazers_count":0,"watchers_count":0,"language":"PHP","has_issues":false,"has_downloads":false,"has_wiki":false,"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":"zendframework:develop","ref":"develop","sha":"05fbf994af4b443c788d6883dd281240afce2d08","user":{"login":"zendframework","id":296074,"avatar_url":"https://avatars.githubusercontent.com/u/296074?v=3","gravatar_id":"","url":"https://api.github.com/users/zendframework","html_url":"https://github.com/zendframework","followers_url":"https://api.github.com/users/zendframework/followers","following_url":"https://api.github.com/users/zendframework/following{/other_user}","gists_url":"https://api.github.com/users/zendframework/gists{/gist_id}","starred_url":"https://api.github.com/users/zendframework/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zendframework/subscriptions","organizations_url":"https://api.github.com/users/zendframework/orgs","repos_url":"https://api.github.com/users/zendframework/repos","events_url":"https://api.github.com/users/zendframework/events{/privacy}","received_events_url":"https://api.github.com/users/zendframework/received_events","type":"Organization","site_admin":false},"repo":{"id":35280826,"name":"zend-servicemanager","full_name":"zendframework/zend-servicemanager","owner":{"login":"zendframework","id":296074,"avatar_url":"https://avatars.githubusercontent.com/u/296074?v=3","gravatar_id":"","url":"https://api.github.com/users/zendframework","html_url":"https://github.com/zendframework","followers_url":"https://api.github.com/users/zendframework/followers","following_url":"https://api.github.com/users/zendframework/following{/other_user}","gists_url":"https://api.github.com/users/zendframework/gists{/gist_id}","starred_url":"https://api.github.com/users/zendframework/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zendframework/subscriptions","organizations_url":"https://api.github.com/users/zendframework/orgs","repos_url":"https://api.github.com/users/zendframework/repos","events_url":"https://api.github.com/users/zendframework/events{/privacy}","received_events_url":"https://api.github.com/users/zendframework/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/zendframework/zend-servicemanager","description":"ServiceManager component from Zend Framework","fork":false,"url":"https://api.github.com/repos/zendframework/zend-servicemanager","forks_url":"https://api.github.com/repos/zendframework/zend-servicemanager/forks","keys_url":"https://api.github.com/repos/zendframework/zend-servicemanager/keys{/key_id}","collaborators_url":"https://api.github.com/repos/zendframework/zend-servicemanager/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/zendframework/zend-servicemanager/teams","hooks_url":"https://api.github.com/repos/zendframework/zend-servicemanager/hooks","issue_events_url":"https://api.github.com/repos/zendframework/zend-servicemanager/issues/events{/number}","events_url":"https://api.github.com/repos/zendframework/zend-servicemanager/events","assignees_url":"https://api.github.com/repos/zendframework/zend-servicemanager/assignees{/user}","branches_url":"https://api.github.com/repos/zendframework/zend-servicemanager/branches{/branch}","tags_url":"https://api.github.com/repos/zendframework/zend-servicemanager/tags","blobs_url":"https://api.github.com/repos/zendframework/zend-servicemanager/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/zendframework/zend-servicemanager/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/zendframework/zend-servicemanager/git/refs{/sha}","trees_url":"https://api.github.com/repos/zendframework/zend-servicemanager/git/trees{/sha}","statuses_url":"https://api.github.com/repos/zendframework/zend-servicemanager/statuses/{sha}","languages_url":"https://api.github.com/repos/zendframework/zend-servicemanager/languages","stargazers_url":"https://api.github.com/repos/zendframework/zend-servicemanager/stargazers","contributors_url":"https://api.github.com/repos/zendframework/zend-servicemanager/contributors","subscribers_url":"https://api.github.com/repos/zendframework/zend-servicemanager/subscribers","subscription_url":"https://api.github.com/repos/zendframework/zend-servicemanager/subscription","commits_url":"https://api.github.com/repos/zendframework/zend-servicemanager/commits{/sha}","git_commits_url":"https://api.github.com/repos/zendframework/zend-servicemanager/git/commits{/sha}","comments_url":"https://api.github.com/repos/zendframework/zend-servicemanager/comments{/number}","issue_comment_url":"https://api.github.com/repos/zendframework/zend-servicemanager/issues/comments{/number}","contents_url":"https://api.github.com/repos/zendframework/zend-servicemanager/contents/{+path}","compare_url":"https://api.github.com/repos/zendframework/zend-servicemanager/compare/{base}...{head}","merges_url":"https://api.github.com/repos/zendframework/zend-servicemanager/merges","archive_url":"https://api.github.com/repos/zendframework/zend-servicemanager/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/zendframework/zend-servicemanager/downloads","issues_url":"https://api.github.com/repos/zendframework/zend-servicemanager/issues{/number}","pulls_url":"https://api.github.com/repos/zendframework/zend-servicemanager/pulls{/number}","milestones_url":"https://api.github.com/repos/zendframework/zend-servicemanager/milestones{/number}","notifications_url":"https://api.github.com/repos/zendframework/zend-servicemanager/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/zendframework/zend-servicemanager/labels{/name}","releases_url":"https://api.github.com/repos/zendframework/zend-servicemanager/releases{/id}","deployments_url":"https://api.github.com/repos/zendframework/zend-servicemanager/deployments","created_at":"2015-05-08T13:28:10Z","updated_at":"2016-08-17T21:57:16Z","pushed_at":"2016-08-24T10:51:39Z","git_url":"git://github.com/zendframework/zend-servicemanager.git","ssh_url":"git@github.com:zendframework/zend-servicemanager.git","clone_url":"https://github.com/zendframework/zend-servicemanager.git","svn_url":"https://github.com/zendframework/zend-servicemanager","homepage":"https://github.com/zendframework/zf2","size":3068,"stargazers_count":46,"watchers_count":46,"language":"PHP","has_issues":true,"has_downloads":false,"has_wiki":false,"has_pages":true,"forks_count":59,"mirror_url":null,"open_issues_count":18,"forks":59,"open_issues":18,"watchers":46,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/zendframework/zend-servicemanager/pulls/143"},"html":{"href":"https://github.com/zendframework/zend-servicemanager/pull/143"},"issue":{"href":"https://api.github.com/repos/zendframework/zend-servicemanager/issues/143"},"comments":{"href":"https://api.github.com/repos/zendframework/zend-servicemanager/issues/143/comments"},"review_comments":{"href":"https://api.github.com/repos/zendframework/zend-servicemanager/pulls/143/comments"},"review_comment":{"href":"https://api.github.com/repos/zendframework/zend-servicemanager/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/zendframework/zend-servicemanager/pulls/143/commits"},"statuses":{"href":"https://api.github.com/repos/zendframework/zend-servicemanager/statuses/ab3e329233f5719310814423143e841634719b4d"}}}}
{"actor":{"display_login":"Ocramius"}}