Skip to content

Instantly share code, notes, and snippets.

@karolrynio
Last active August 29, 2015 14:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save karolrynio/643a600061593ae04420 to your computer and use it in GitHub Desktop.
Save karolrynio/643a600061593ae04420 to your computer and use it in GitHub Desktop.
<?php
return [
// ...
'invokables' => [
// move your controller declaration from here
],
'factories' => [
// to here
'yourController' => function($sl) {
return new YourController($sl);
}
]
//...
];
// and in controller class
class YourController extends Controller {
public __construct($sl) {
$this->userModel = $sl->get('doctrine.entitymanager.orm_default');
}
// ...
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment