Last active
August 29, 2015 14:07
-
-
Save karolrynio/643a600061593ae04420 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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