{"action":"created","issue":{"url":"https://api.github.com/repos/rdlowrey/auryn/issues/112","labels_url":"https://api.github.com/repos/rdlowrey/auryn/issues/112/labels{/name}","comments_url":"https://api.github.com/repos/rdlowrey/auryn/issues/112/comments","events_url":"https://api.github.com/repos/rdlowrey/auryn/issues/112/events","html_url":"https://github.com/rdlowrey/auryn/issues/112","id":98676519,"number":112,"title":"Injecting dependencies to PDO returned entities.","user":{"login":"vlakarados","id":386678,"avatar_url":"https://avatars.githubusercontent.com/u/386678?v=3","gravatar_id":"","url":"https://api.github.com/users/vlakarados","html_url":"https://github.com/vlakarados","followers_url":"https://api.github.com/users/vlakarados/followers","following_url":"https://api.github.com/users/vlakarados/following{/other_user}","gists_url":"https://api.github.com/users/vlakarados/gists{/gist_id}","starred_url":"https://api.github.com/users/vlakarados/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vlakarados/subscriptions","organizations_url":"https://api.github.com/users/vlakarados/orgs","repos_url":"https://api.github.com/users/vlakarados/repos","events_url":"https://api.github.com/users/vlakarados/events{/privacy}","received_events_url":"https://api.github.com/users/vlakarados/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-08-03T05:43:33Z","updated_at":"2015-08-11T15:10:10Z","closed_at":null,"body":"Would like to know if it's possible to inject dependencies to objects created by PDO `fetch/All(PDO::FETCH_CLASS, 'MyClass')`. Maybe someone already uses some workaround or found a way to do it properly? As `fetchAll()` doesn't allow `PDO::FETCH_INTO` style.\r\n\r\nCurrently I simply create arrays and pass them to class constructors along with the dependencies.\r\nLooking into doing it with `PDO::FETCH_FUNC`. So what do you use?"},"comment":{"url":"https://api.github.com/repos/rdlowrey/auryn/issues/comments/129923730","html_url":"https://github.com/rdlowrey/auryn/issues/112#issuecomment-129923730","issue_url":"https://api.github.com/repos/rdlowrey/auryn/issues/112","id":129923730,"user":{"login":"Danack","id":1505719,"avatar_url":"https://avatars.githubusercontent.com/u/1505719?v=3","gravatar_id":"","url":"https://api.github.com/users/Danack","html_url":"https://github.com/Danack","followers_url":"https://api.github.com/users/Danack/followers","following_url":"https://api.github.com/users/Danack/following{/other_user}","gists_url":"https://api.github.com/users/Danack/gists{/gist_id}","starred_url":"https://api.github.com/users/Danack/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Danack/subscriptions","organizations_url":"https://api.github.com/users/Danack/orgs","repos_url":"https://api.github.com/users/Danack/repos","events_url":"https://api.github.com/users/Danack/events{/privacy}","received_events_url":"https://api.github.com/users/Danack/received_events","type":"User","site_admin":false},"created_at":"2015-08-11T15:10:10Z","updated_at":"2015-08-11T15:10:10Z","body":"> What might be the other ways to do this besides FETCH_FUNC?\r\n\r\nIt sounds like you might want to check out the Zend/Doctrine object hydration libraries....however they are way out of scope for a DI library."}}