{"action":"created","issue":{"url":"https://api.github.com/repos/themosis/framework/issues/191","labels_url":"https://api.github.com/repos/themosis/framework/issues/191/labels{/name}","comments_url":"https://api.github.com/repos/themosis/framework/issues/191/comments","events_url":"https://api.github.com/repos/themosis/framework/issues/191/events","html_url":"https://github.com/themosis/framework/issues/191","id":100261734,"number":191,"title":"Allow other plugin to bind service / igniter","user":{"login":"jofrysutanto","id":2671631,"avatar_url":"https://avatars.githubusercontent.com/u/2671631?v=3","gravatar_id":"","url":"https://api.github.com/users/jofrysutanto","html_url":"https://github.com/jofrysutanto","followers_url":"https://api.github.com/users/jofrysutanto/followers","following_url":"https://api.github.com/users/jofrysutanto/following{/other_user}","gists_url":"https://api.github.com/users/jofrysutanto/gists{/gist_id}","starred_url":"https://api.github.com/users/jofrysutanto/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jofrysutanto/subscriptions","organizations_url":"https://api.github.com/users/jofrysutanto/orgs","repos_url":"https://api.github.com/users/jofrysutanto/repos","events_url":"https://api.github.com/users/jofrysutanto/events{/privacy}","received_events_url":"https://api.github.com/users/jofrysutanto/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-08-11T08:54:39Z","updated_at":"2015-08-11T09:56:48Z","closed_at":"2015-08-11T09:56:48Z","body":"Is there a way for external plugin to register bindings?\r\n\r\nBeen having to add my own `apply_filters` into `bootstrap/start.php` in order to do this. Am I missing something?\r\n\r\nWhat i did: \r\n\r\n```\r\n/*----------------------------------------------------*/\r\n// Register Core Igniter services\r\n/*----------------------------------------------------*/\r\n$app->registerCoreIgniters();\r\n\r\n// Allow other plugins to register igniter\r\napply_filters('themosis_additional_bindings', $app);\r\n\r\n/*----------------------------------------------------*/\r\n// Set application configurations.\r\n/*----------------------------------------------------*/\r\ndo_action('themosis_configuration');\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/themosis/framework/issues/comments/129799292","html_url":"https://github.com/themosis/framework/issues/191#issuecomment-129799292","issue_url":"https://api.github.com/repos/themosis/framework/issues/191","id":129799292,"user":{"login":"jofrysutanto","id":2671631,"avatar_url":"https://avatars.githubusercontent.com/u/2671631?v=3","gravatar_id":"","url":"https://api.github.com/users/jofrysutanto","html_url":"https://github.com/jofrysutanto","followers_url":"https://api.github.com/users/jofrysutanto/followers","following_url":"https://api.github.com/users/jofrysutanto/following{/other_user}","gists_url":"https://api.github.com/users/jofrysutanto/gists{/gist_id}","starred_url":"https://api.github.com/users/jofrysutanto/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jofrysutanto/subscriptions","organizations_url":"https://api.github.com/users/jofrysutanto/orgs","repos_url":"https://api.github.com/users/jofrysutanto/repos","events_url":"https://api.github.com/users/jofrysutanto/events{/privacy}","received_events_url":"https://api.github.com/users/jofrysutanto/received_events","type":"User","site_admin":false},"created_at":"2015-08-11T09:56:47Z","updated_at":"2015-08-11T09:56:47Z","body":"That's okay.\r\n\r\nI have been able to register the bindings by passing `$app` through filter to my class:\r\n\r\n```\r\n// in themosis/bootstrap/start.php\r\n// Allow other plugins to register igniter\r\napply_filters('themosis_additional_bindings', $app);\r\n\r\n// .. \r\n// .. in my plugin\r\n/**\r\n * Load the main class.\r\n */\r\nadd_filter('themosis_register_bindings', function ($app)\r\n{\r\n\t$app->register('\\TrueFrame\\Helpers\\LibIgniterService');\r\n\t$app->alias('true.lib', '\\TrueFrame\\Helpers\\Lib');\r\n});\r\n```\r\n\r\nSeems to be working well, just need to make sure i can easily merge that line back everytime I pull from here.\r\n\r\nCheers.\r\n\r\n"}}