{"action":"created","issue":{"url":"https://api.github.com/repos/joomla-framework/language/issues/12","labels_url":"https://api.github.com/repos/joomla-framework/language/issues/12/labels{/name}","comments_url":"https://api.github.com/repos/joomla-framework/language/issues/12/comments","events_url":"https://api.github.com/repos/joomla-framework/language/issues/12/events","html_url":"https://github.com/joomla-framework/language/issues/12","id":56937966,"number":12,"title":"Is getInstance actually needed?","user":{"login":"wilsonge","id":1986000,"avatar_url":"https://avatars.githubusercontent.com/u/1986000?v=3","gravatar_id":"","url":"https://api.github.com/users/wilsonge","html_url":"https://github.com/wilsonge","followers_url":"https://api.github.com/users/wilsonge/followers","following_url":"https://api.github.com/users/wilsonge/following{/other_user}","gists_url":"https://api.github.com/users/wilsonge/gists{/gist_id}","starred_url":"https://api.github.com/users/wilsonge/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wilsonge/subscriptions","organizations_url":"https://api.github.com/users/wilsonge/orgs","repos_url":"https://api.github.com/users/wilsonge/repos","events_url":"https://api.github.com/users/wilsonge/events{/privacy}","received_events_url":"https://api.github.com/users/wilsonge/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/joomla-framework/language/labels/question","name":"question","color":"cc317c"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-02-08T04:05:30Z","updated_at":"2015-02-08T20:56:59Z","closed_at":null,"body":"I think that getInstance in version 2.0 can be removed. The caching using the debug object is stupid because theoretically you can create two language objects per actual language both with different files loaded etc.\r\n\r\nThen if you are only caching based on the language name you may as well hand this off to the user. It could be done in your DI Container or some other place. Not necessarily in the language class"},"comment":{"url":"https://api.github.com/repos/joomla-framework/language/issues/comments/73431308","html_url":"https://github.com/joomla-framework/language/issues/12#issuecomment-73431308","issue_url":"https://api.github.com/repos/joomla-framework/language/issues/12","id":73431308,"user":{"login":"eddieajau","id":700871,"avatar_url":"https://avatars.githubusercontent.com/u/700871?v=3","gravatar_id":"","url":"https://api.github.com/users/eddieajau","html_url":"https://github.com/eddieajau","followers_url":"https://api.github.com/users/eddieajau/followers","following_url":"https://api.github.com/users/eddieajau/following{/other_user}","gists_url":"https://api.github.com/users/eddieajau/gists{/gist_id}","starred_url":"https://api.github.com/users/eddieajau/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eddieajau/subscriptions","organizations_url":"https://api.github.com/users/eddieajau/orgs","repos_url":"https://api.github.com/users/eddieajau/repos","events_url":"https://api.github.com/users/eddieajau/events{/privacy}","received_events_url":"https://api.github.com/users/eddieajau/received_events","type":"User","site_admin":false},"created_at":"2015-02-08T20:56:59Z","updated_at":"2015-02-08T20:56:59Z","body":"The method is technically correct, but I agree that the getInstance method is unnecessary so +1 from me. "}}