Skip to content
This repository has been archived by the owner on Apr 21, 2018. It is now read-only.

Commit

Permalink
Merge pull request #3 from shhirose/bugfix_data_controllers
Browse files Browse the repository at this point in the history
data_controllers should be a function.
  • Loading branch information
Dominik Zogg committed Jun 8, 2016
2 parents 88373e2 + 62e0732 commit f5f3fff
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Provider/SaxulumWebProfilerProvider.php
Expand Up @@ -47,7 +47,7 @@ function (\Twig_Loader_Filesystem $twigLoaderFilesystem) {
$app['data_collectors'] = $app->extend('data_collectors',
$app->share(function(array $collectors) use ($app) {
if(isset($app['doctrine'])) {
$collectors['db'] = $app['saxulum.orm.datacolletor'];
$collectors['db'] = function ($app) { $app['saxulum.orm.datacolletor']; };
}

if(isset($app['doctrine_mongodb'])) {
Expand All @@ -60,15 +60,15 @@ function (\Twig_Loader_Filesystem $twigLoaderFilesystem) {
}
));

$collectors['mongodb'] = $app['saxulum.mongodb.odm.datacolletor'];
$collectors['mongodb'] = function ($app) { return $app['saxulum.mongodb.odm.datacolletor']; };
}

return $collectors;
}
));

$app['data_collector.templates'] = $app->extend('data_collector.templates',
$app->share(function(Application $app, array $dataCollectorTemplates) {
$app->share(function(array $dataCollectorTemplates) use ($app) {
if(isset($app['doctrine'])) {
$dataCollectorTemplates[] = array('db', '@SaxulumWebProfilerProvider/Collector/db.html.twig');
}
Expand Down

0 comments on commit f5f3fff

Please sign in to comment.