{"action":"created","issue":{"url":"https://api.github.com/repos/phalcon/cphalcon/issues/1036","repository_url":"https://api.github.com/repos/phalcon/cphalcon","labels_url":"https://api.github.com/repos/phalcon/cphalcon/issues/1036/labels{/name}","comments_url":"https://api.github.com/repos/phalcon/cphalcon/issues/1036/comments","events_url":"https://api.github.com/repos/phalcon/cphalcon/issues/1036/events","html_url":"https://github.com/phalcon/cphalcon/issues/1036","id":17810159,"number":1036,"title":"[NFR] When using controller as micro app handler, Controller::initialize should be invoked","user":{"login":"jeffreycahyono","id":1821605,"avatar_url":"https://avatars.githubusercontent.com/u/1821605?v=3","gravatar_id":"","url":"https://api.github.com/users/jeffreycahyono","html_url":"https://github.com/jeffreycahyono","followers_url":"https://api.github.com/users/jeffreycahyono/followers","following_url":"https://api.github.com/users/jeffreycahyono/following{/other_user}","gists_url":"https://api.github.com/users/jeffreycahyono/gists{/gist_id}","starred_url":"https://api.github.com/users/jeffreycahyono/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jeffreycahyono/subscriptions","organizations_url":"https://api.github.com/users/jeffreycahyono/orgs","repos_url":"https://api.github.com/users/jeffreycahyono/repos","events_url":"https://api.github.com/users/jeffreycahyono/events{/privacy}","received_events_url":"https://api.github.com/users/jeffreycahyono/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/phalcon/cphalcon/labels/New%20Feature%20Request","name":"New Feature Request","color":"0052cc"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2013-08-08T14:41:27Z","updated_at":"2016-10-06T15:43:05Z","closed_at":null,"body":"In the regular Mvc controller, controller::initialize() method is always invoked before calling the matched action but\r\n\r\nwhen using controller as micro app handler, Controller::initialize is ignored.\r\nIt would be very helpfull if the initialize method in controller is also invoked.\r\n\r\n<bountysource-plugin>\r\n---\r\nWant to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/1896461-nfr-when-using-controller-as-micro-app-handler-controller-initialize-should-be-invoked?utm_campaign=plugin&utm_content=tracker%2F50707&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F50707&utm_medium=issues&utm_source=github).\r\n</bountysource-plugin>"},"comment":{"url":"https://api.github.com/repos/phalcon/cphalcon/issues/comments/252002532","html_url":"https://github.com/phalcon/cphalcon/issues/1036#issuecomment-252002532","issue_url":"https://api.github.com/repos/phalcon/cphalcon/issues/1036","id":252002532,"user":{"login":"Jurigag","id":10086991,"avatar_url":"https://avatars.githubusercontent.com/u/10086991?v=3","gravatar_id":"","url":"https://api.github.com/users/Jurigag","html_url":"https://github.com/Jurigag","followers_url":"https://api.github.com/users/Jurigag/followers","following_url":"https://api.github.com/users/Jurigag/following{/other_user}","gists_url":"https://api.github.com/users/Jurigag/gists{/gist_id}","starred_url":"https://api.github.com/users/Jurigag/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Jurigag/subscriptions","organizations_url":"https://api.github.com/users/Jurigag/orgs","repos_url":"https://api.github.com/users/Jurigag/repos","events_url":"https://api.github.com/users/Jurigag/events{/privacy}","received_events_url":"https://api.github.com/users/Jurigag/received_events","type":"User","site_admin":false},"created_at":"2016-10-06T15:43:04Z","updated_at":"2016-10-06T15:43:04Z","body":"Controller in micro application is just some generic class for storing methods. Controller as itself is NEVER created when executing your action. \r\n\r\nThis needs to rewrite whole micro and probably introduce dispatcher to micro. This will just slow down application.\r\n\r\nNot sure also why you need it. Controller extends Injectable, so you can access any service without any problem."}}
{"actor":{"display_login":"Jurigag"}}