{"action":"created","issue":{"url":"https://api.github.com/repos/silexphp/Silex/issues/1325","repository_url":"https://api.github.com/repos/silexphp/Silex","labels_url":"https://api.github.com/repos/silexphp/Silex/issues/1325/labels{/name}","comments_url":"https://api.github.com/repos/silexphp/Silex/issues/1325/comments","events_url":"https://api.github.com/repos/silexphp/Silex/issues/1325/events","html_url":"https://github.com/silexphp/Silex/issues/1325","id":144076780,"number":1325,"title":"Can I use the controller type hinting for inject  custom types (classes)?","user":{"login":"cocodrino","id":616412,"avatar_url":"https://avatars.githubusercontent.com/u/616412?v=3","gravatar_id":"","url":"https://api.github.com/users/cocodrino","html_url":"https://github.com/cocodrino","followers_url":"https://api.github.com/users/cocodrino/followers","following_url":"https://api.github.com/users/cocodrino/following{/other_user}","gists_url":"https://api.github.com/users/cocodrino/gists{/gist_id}","starred_url":"https://api.github.com/users/cocodrino/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cocodrino/subscriptions","organizations_url":"https://api.github.com/users/cocodrino/orgs","repos_url":"https://api.github.com/users/cocodrino/repos","events_url":"https://api.github.com/users/cocodrino/events{/privacy}","received_events_url":"https://api.github.com/users/cocodrino/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":7,"created_at":"2016-03-28T20:36:28Z","updated_at":"2016-05-04T02:28:05Z","closed_at":"2016-05-04T02:28:05Z","body":"Hi, I know than I can inject Request, Application and many others  classes in my controller, but currently I wish make something like this\r\n\r\n```php\r\n\r\nfunction (Request $request, Silex\\Application $app, Helpers $hlp, DB $db) \r\n\r\n```\r\n\r\nwhere DB is a dummy class with static methods right now, but in the future would be something more complex and the DI would be a nice solution, hope you can understand my point, please let me know if you need some clarification, thank you!!.....\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/silexphp/Silex/issues/comments/216725791","html_url":"https://github.com/silexphp/Silex/issues/1325#issuecomment-216725791","issue_url":"https://api.github.com/repos/silexphp/Silex/issues/1325","id":216725791,"user":{"login":"cocodrino","id":616412,"avatar_url":"https://avatars.githubusercontent.com/u/616412?v=3","gravatar_id":"","url":"https://api.github.com/users/cocodrino","html_url":"https://github.com/cocodrino","followers_url":"https://api.github.com/users/cocodrino/followers","following_url":"https://api.github.com/users/cocodrino/following{/other_user}","gists_url":"https://api.github.com/users/cocodrino/gists{/gist_id}","starred_url":"https://api.github.com/users/cocodrino/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cocodrino/subscriptions","organizations_url":"https://api.github.com/users/cocodrino/orgs","repos_url":"https://api.github.com/users/cocodrino/repos","events_url":"https://api.github.com/users/cocodrino/events{/privacy}","received_events_url":"https://api.github.com/users/cocodrino/received_events","type":"User","site_admin":false},"created_at":"2016-05-04T02:28:05Z","updated_at":"2016-05-04T02:28:05Z","body":"thanks for the reply @ragboyjr , Yes I think than I'm searching for a solution similar to your 2nd example, using functions, hope than your propose will be accepted!!..."}}