{"action":"closed","number":551,"pull_request":{"url":"https://api.github.com/repos/pimcore/pimcore/pulls/551","id":66488985,"html_url":"https://github.com/pimcore/pimcore/pull/551","diff_url":"https://github.com/pimcore/pimcore/pull/551.diff","patch_url":"https://github.com/pimcore/pimcore/pull/551.patch","issue_url":"https://api.github.com/repos/pimcore/pimcore/issues/551","number":551,"state":"closed","locked":false,"title":"Add Pimple PHP Dependency Injection Container http://pimple.sensiolab…","user":{"login":"kardasz","id":1894170,"avatar_url":"https://avatars.githubusercontent.com/u/1894170?v=3","gravatar_id":"","url":"https://api.github.com/users/kardasz","html_url":"https://github.com/kardasz","followers_url":"https://api.github.com/users/kardasz/followers","following_url":"https://api.github.com/users/kardasz/following{/other_user}","gists_url":"https://api.github.com/users/kardasz/gists{/gist_id}","starred_url":"https://api.github.com/users/kardasz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kardasz/subscriptions","organizations_url":"https://api.github.com/users/kardasz/orgs","repos_url":"https://api.github.com/users/kardasz/repos","events_url":"https://api.github.com/users/kardasz/events{/privacy}","received_events_url":"https://api.github.com/users/kardasz/received_events","type":"User","site_admin":false},"body":"Add Pimple PHP Dependency Injection Container for future usage\r\n\r\nFor example when pimcore will use DI for their core class then we can have posibility to override core class pretty nice way without hardcoding:\r\n\r\n```php\r\n<?php\r\n\r\n// website/models/Website/User.php\r\nnamespace Website;\r\n\r\nclass User extends \\Pimcore\\Model\\User {\r\n    public function myCustomMethod () {\r\n      return 'hello there!';\r\n    }\r\n}\r\n\r\n// website/config/startup.php\r\n$container = \\Zend_Controller_Front::getInstance()->getParam('container');\r\n$container['Pimcore\\Model\\User'] = $container->factory(function ($c) {\r\n    return new \\Website\\User();\r\n});\r\n\r\n// DefaultController.php\r\nuse Website\\Controller\\Action;\r\n\r\nclass DefaultController extends Action\r\n{\r\n    public function indexAction()\r\n    {\r\n      $user = $this->getInvokeArg('container')['Pimcore\\Model\\User'] ;\r\n      echo $user->myCustomMethod(); // prints hello there!\r\n    }\r\n}\r\n```","created_at":"2016-04-14T14:01:44Z","updated_at":"2016-04-14T14:42:51Z","closed_at":"2016-04-14T14:42:51Z","merged_at":null,"merge_commit_sha":"a5668440e42a1a9696ebf54aeea7d08c623ec81b","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/pimcore/pimcore/pulls/551/commits","review_comments_url":"https://api.github.com/repos/pimcore/pimcore/pulls/551/comments","review_comment_url":"https://api.github.com/repos/pimcore/pimcore/pulls/comments{/number}","comments_url":"https://api.github.com/repos/pimcore/pimcore/issues/551/comments","statuses_url":"https://api.github.com/repos/pimcore/pimcore/statuses/16d7c055db8c2a9fe4df651e968b5d62d27c68d6","head":{"label":"kardasz:master","ref":"master","sha":"16d7c055db8c2a9fe4df651e968b5d62d27c68d6","user":{"login":"kardasz","id":1894170,"avatar_url":"https://avatars.githubusercontent.com/u/1894170?v=3","gravatar_id":"","url":"https://api.github.com/users/kardasz","html_url":"https://github.com/kardasz","followers_url":"https://api.github.com/users/kardasz/followers","following_url":"https://api.github.com/users/kardasz/following{/other_user}","gists_url":"https://api.github.com/users/kardasz/gists{/gist_id}","starred_url":"https://api.github.com/users/kardasz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kardasz/subscriptions","organizations_url":"https://api.github.com/users/kardasz/orgs","repos_url":"https://api.github.com/users/kardasz/repos","events_url":"https://api.github.com/users/kardasz/events{/privacy}","received_events_url":"https://api.github.com/users/kardasz/received_events","type":"User","site_admin":false},"repo":{"id":56241940,"name":"pimcore","full_name":"kardasz/pimcore","owner":{"login":"kardasz","id":1894170,"avatar_url":"https://avatars.githubusercontent.com/u/1894170?v=3","gravatar_id":"","url":"https://api.github.com/users/kardasz","html_url":"https://github.com/kardasz","followers_url":"https://api.github.com/users/kardasz/followers","following_url":"https://api.github.com/users/kardasz/following{/other_user}","gists_url":"https://api.github.com/users/kardasz/gists{/gist_id}","starred_url":"https://api.github.com/users/kardasz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kardasz/subscriptions","organizations_url":"https://api.github.com/users/kardasz/orgs","repos_url":"https://api.github.com/users/kardasz/repos","events_url":"https://api.github.com/users/kardasz/events{/privacy}","received_events_url":"https://api.github.com/users/kardasz/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/kardasz/pimcore","description":"Content & Product Management Framework (CMS/PIM/E-Commerce)","fork":true,"url":"https://api.github.com/repos/kardasz/pimcore","forks_url":"https://api.github.com/repos/kardasz/pimcore/forks","keys_url":"https://api.github.com/repos/kardasz/pimcore/keys{/key_id}","collaborators_url":"https://api.github.com/repos/kardasz/pimcore/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/kardasz/pimcore/teams","hooks_url":"https://api.github.com/repos/kardasz/pimcore/hooks","issue_events_url":"https://api.github.com/repos/kardasz/pimcore/issues/events{/number}","events_url":"https://api.github.com/repos/kardasz/pimcore/events","assignees_url":"https://api.github.com/repos/kardasz/pimcore/assignees{/user}","branches_url":"https://api.github.com/repos/kardasz/pimcore/branches{/branch}","tags_url":"https://api.github.com/repos/kardasz/pimcore/tags","blobs_url":"https://api.github.com/repos/kardasz/pimcore/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/kardasz/pimcore/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/kardasz/pimcore/git/refs{/sha}","trees_url":"https://api.github.com/repos/kardasz/pimcore/git/trees{/sha}","statuses_url":"https://api.github.com/repos/kardasz/pimcore/statuses/{sha}","languages_url":"https://api.github.com/repos/kardasz/pimcore/languages","stargazers_url":"https://api.github.com/repos/kardasz/pimcore/stargazers","contributors_url":"https://api.github.com/repos/kardasz/pimcore/contributors","subscribers_url":"https://api.github.com/repos/kardasz/pimcore/subscribers","subscription_url":"https://api.github.com/repos/kardasz/pimcore/subscription","commits_url":"https://api.github.com/repos/kardasz/pimcore/commits{/sha}","git_commits_url":"https://api.github.com/repos/kardasz/pimcore/git/commits{/sha}","comments_url":"https://api.github.com/repos/kardasz/pimcore/comments{/number}","issue_comment_url":"https://api.github.com/repos/kardasz/pimcore/issues/comments{/number}","contents_url":"https://api.github.com/repos/kardasz/pimcore/contents/{+path}","compare_url":"https://api.github.com/repos/kardasz/pimcore/compare/{base}...{head}","merges_url":"https://api.github.com/repos/kardasz/pimcore/merges","archive_url":"https://api.github.com/repos/kardasz/pimcore/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/kardasz/pimcore/downloads","issues_url":"https://api.github.com/repos/kardasz/pimcore/issues{/number}","pulls_url":"https://api.github.com/repos/kardasz/pimcore/pulls{/number}","milestones_url":"https://api.github.com/repos/kardasz/pimcore/milestones{/number}","notifications_url":"https://api.github.com/repos/kardasz/pimcore/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/kardasz/pimcore/labels{/name}","releases_url":"https://api.github.com/repos/kardasz/pimcore/releases{/id}","deployments_url":"https://api.github.com/repos/kardasz/pimcore/deployments","created_at":"2016-04-14T13:58:35Z","updated_at":"2016-04-14T13:58:45Z","pushed_at":"2016-04-14T13:59:23Z","git_url":"git://github.com/kardasz/pimcore.git","ssh_url":"git@github.com:kardasz/pimcore.git","clone_url":"https://github.com/kardasz/pimcore.git","svn_url":"https://github.com/kardasz/pimcore","homepage":"http://www.pimcore.org/","size":290203,"stargazers_count":0,"watchers_count":0,"language":"PHP","has_issues":false,"has_downloads":true,"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":"pimcore:master","ref":"master","sha":"a78a52fa39d4225920d4e173297a180f621bda3a","user":{"login":"pimcore","id":686745,"avatar_url":"https://avatars.githubusercontent.com/u/686745?v=3","gravatar_id":"","url":"https://api.github.com/users/pimcore","html_url":"https://github.com/pimcore","followers_url":"https://api.github.com/users/pimcore/followers","following_url":"https://api.github.com/users/pimcore/following{/other_user}","gists_url":"https://api.github.com/users/pimcore/gists{/gist_id}","starred_url":"https://api.github.com/users/pimcore/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pimcore/subscriptions","organizations_url":"https://api.github.com/users/pimcore/orgs","repos_url":"https://api.github.com/users/pimcore/repos","events_url":"https://api.github.com/users/pimcore/events{/privacy}","received_events_url":"https://api.github.com/users/pimcore/received_events","type":"Organization","site_admin":false},"repo":{"id":2686502,"name":"pimcore","full_name":"pimcore/pimcore","owner":{"login":"pimcore","id":686745,"avatar_url":"https://avatars.githubusercontent.com/u/686745?v=3","gravatar_id":"","url":"https://api.github.com/users/pimcore","html_url":"https://github.com/pimcore","followers_url":"https://api.github.com/users/pimcore/followers","following_url":"https://api.github.com/users/pimcore/following{/other_user}","gists_url":"https://api.github.com/users/pimcore/gists{/gist_id}","starred_url":"https://api.github.com/users/pimcore/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pimcore/subscriptions","organizations_url":"https://api.github.com/users/pimcore/orgs","repos_url":"https://api.github.com/users/pimcore/repos","events_url":"https://api.github.com/users/pimcore/events{/privacy}","received_events_url":"https://api.github.com/users/pimcore/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/pimcore/pimcore","description":"Content & Product Management Framework (CMS/PIM/E-Commerce)","fork":false,"url":"https://api.github.com/repos/pimcore/pimcore","forks_url":"https://api.github.com/repos/pimcore/pimcore/forks","keys_url":"https://api.github.com/repos/pimcore/pimcore/keys{/key_id}","collaborators_url":"https://api.github.com/repos/pimcore/pimcore/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/pimcore/pimcore/teams","hooks_url":"https://api.github.com/repos/pimcore/pimcore/hooks","issue_events_url":"https://api.github.com/repos/pimcore/pimcore/issues/events{/number}","events_url":"https://api.github.com/repos/pimcore/pimcore/events","assignees_url":"https://api.github.com/repos/pimcore/pimcore/assignees{/user}","branches_url":"https://api.github.com/repos/pimcore/pimcore/branches{/branch}","tags_url":"https://api.github.com/repos/pimcore/pimcore/tags","blobs_url":"https://api.github.com/repos/pimcore/pimcore/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/pimcore/pimcore/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/pimcore/pimcore/git/refs{/sha}","trees_url":"https://api.github.com/repos/pimcore/pimcore/git/trees{/sha}","statuses_url":"https://api.github.com/repos/pimcore/pimcore/statuses/{sha}","languages_url":"https://api.github.com/repos/pimcore/pimcore/languages","stargazers_url":"https://api.github.com/repos/pimcore/pimcore/stargazers","contributors_url":"https://api.github.com/repos/pimcore/pimcore/contributors","subscribers_url":"https://api.github.com/repos/pimcore/pimcore/subscribers","subscription_url":"https://api.github.com/repos/pimcore/pimcore/subscription","commits_url":"https://api.github.com/repos/pimcore/pimcore/commits{/sha}","git_commits_url":"https://api.github.com/repos/pimcore/pimcore/git/commits{/sha}","comments_url":"https://api.github.com/repos/pimcore/pimcore/comments{/number}","issue_comment_url":"https://api.github.com/repos/pimcore/pimcore/issues/comments{/number}","contents_url":"https://api.github.com/repos/pimcore/pimcore/contents/{+path}","compare_url":"https://api.github.com/repos/pimcore/pimcore/compare/{base}...{head}","merges_url":"https://api.github.com/repos/pimcore/pimcore/merges","archive_url":"https://api.github.com/repos/pimcore/pimcore/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/pimcore/pimcore/downloads","issues_url":"https://api.github.com/repos/pimcore/pimcore/issues{/number}","pulls_url":"https://api.github.com/repos/pimcore/pimcore/pulls{/number}","milestones_url":"https://api.github.com/repos/pimcore/pimcore/milestones{/number}","notifications_url":"https://api.github.com/repos/pimcore/pimcore/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/pimcore/pimcore/labels{/name}","releases_url":"https://api.github.com/repos/pimcore/pimcore/releases{/id}","deployments_url":"https://api.github.com/repos/pimcore/pimcore/deployments","created_at":"2011-11-01T09:16:14Z","updated_at":"2016-04-13T09:42:56Z","pushed_at":"2016-04-14T14:37:21Z","git_url":"git://github.com/pimcore/pimcore.git","ssh_url":"git@github.com:pimcore/pimcore.git","clone_url":"https://github.com/pimcore/pimcore.git","svn_url":"https://github.com/pimcore/pimcore","homepage":"http://www.pimcore.org/","size":295583,"stargazers_count":513,"watchers_count":513,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":260,"mirror_url":null,"open_issues_count":76,"forks":260,"open_issues":76,"watchers":513,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/pimcore/pimcore/pulls/551"},"html":{"href":"https://github.com/pimcore/pimcore/pull/551"},"issue":{"href":"https://api.github.com/repos/pimcore/pimcore/issues/551"},"comments":{"href":"https://api.github.com/repos/pimcore/pimcore/issues/551/comments"},"review_comments":{"href":"https://api.github.com/repos/pimcore/pimcore/pulls/551/comments"},"review_comment":{"href":"https://api.github.com/repos/pimcore/pimcore/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/pimcore/pimcore/pulls/551/commits"},"statuses":{"href":"https://api.github.com/repos/pimcore/pimcore/statuses/16d7c055db8c2a9fe4df651e968b5d62d27c68d6"}},"merged":false,"mergeable":true,"mergeable_state":"clean","merged_by":null,"comments":2,"review_comments":0,"commits":1,"additions":11,"deletions":1,"changed_files":3}}