Update service provider

This commit is contained in:
Romain Neutron
2012-09-21 15:49:52 +02:00
parent b9e92fafff
commit d75b8ee239
5 changed files with 27 additions and 37 deletions

View File

@@ -34,6 +34,5 @@ class BorderManagerServiceProvider implements ServiceProviderInterface
public function boot(Application $app)
{
}
}

View File

@@ -26,6 +26,5 @@ class BrowserServiceProvider implements ServiceProviderInterface
public function boot(Application $app)
{
}
}

View File

@@ -20,8 +20,6 @@ class CacheServiceProvider implements ServiceProviderInterface
public function register(Application $app)
{
$app['phraseanet.cache-service'] = $app->share(function(Application $app) {
if ( ! file_exists(__DIR__ . '/../../../../../tmp/cache_registry.yml')) {
touch(__DIR__ . '/../../../../../tmp/cache_registry.yml');
@@ -31,14 +29,12 @@ class CacheServiceProvider implements ServiceProviderInterface
});
$app['cache'] = $app->share(function(Application $app) {
return $app['phraseanet.cache-service']
->get('MainCache', $app['phraseanet.configuration']->getCache())
->getDriver();
});
$app['opcode-cache'] = $app->share(function(Application $app) {
return $app['phraseanet.cache-service']
->get('OpcodeCache', $app['phraseanet.configuration']->getOpcodeCache())
->getDriver();
@@ -47,6 +43,5 @@ class CacheServiceProvider implements ServiceProviderInterface
public function boot(Application $app)
{
}
}

View File

@@ -22,7 +22,6 @@ class ConfigurationServiceProvider implements ServiceProviderInterface
public function register(SilexApplication $app)
{
$app['phraseanet.configuration'] = $app->share(function(Application $app) {
return Configuration::build(null, $app->getEnvironment());
});
}

View File

@@ -21,7 +21,6 @@ class ORMServiceProvider implements ServiceProviderInterface
public function register(Application $app)
{
$app['EM'] = $app->share(function(Application $app) {
return Builder::create(
$app, $app['phraseanet.configuration']
->getService($app['phraseanet.configuration']
@@ -32,6 +31,5 @@ class ORMServiceProvider implements ServiceProviderInterface
public function boot(Application $app)
{
}
}