made a service shared

This commit is contained in:
Fabien Potencier
2012-07-06 22:28:42 +02:00
parent a5523902ba
commit 9f837611b5

View File

@@ -11,13 +11,12 @@ class UtilsServiceProvider implements ServiceProviderInterface
* Register the Utils class on the Application ServiceProvider
*
* @param Application $app Silex Application
* @return Utils Instance of the Utils class
*/
public function register(Application $app)
{
$app['utils'] = function () use ($app) {
$app['utils'] = $app->share(function () use ($app) {
return new Utils($app);
};
});
}
public function boot(Application $app)