Removed old resources array property from DI extension classes.

This commit is contained in:
Kris Wallsmith 2010-10-17 04:51:37 -07:00 committed by Fabien Potencier
parent f79e23ffb5
commit 29360a0eea
4 changed files with 6 additions and 23 deletions

View File

@ -26,11 +26,6 @@ use Symfony\Component\DependencyInjection\Resource\FileResource;
*/
class DoctrineExtension extends Extension
{
protected $resources = array(
'dbal' => 'dbal.xml',
'orm' => 'orm.xml',
);
/**
* Loads the DBAL configuration.
*
@ -74,7 +69,7 @@ class DoctrineExtension extends Extension
{
if (!$container->hasDefinition('doctrine.dbal.logger')) {
$loader = new XmlFileLoader($container, __DIR__.'/../Resources/config');
$loader->load($this->resources['dbal']);
$loader->load('dbal.xml');
}
$defaultConnectionName = isset($config['default_connection']) ? $config['default_connection'] : $container->getParameter('doctrine.dbal.default_connection');
@ -209,7 +204,7 @@ class DoctrineExtension extends Extension
{
if (!$container->hasDefinition('doctrine.orm.metadata_driver.annotation')) {
$loader = new XmlFileLoader($container, __DIR__.'/../Resources/config');
$loader->load($this->resources['orm']);
$loader->load('orm.xml');
}
// Allow these application configuration options to override the defaults

View File

@ -18,10 +18,6 @@ use Symfony\Component\DependencyInjection\Resource\FileResource;
*/
class DoctrineMongoDBExtension extends Extension
{
protected $resources = array(
'mongodb' => 'mongodb.xml',
);
/**
* Loads the MongoDB ODM configuration.
*
@ -67,7 +63,7 @@ class DoctrineMongoDBExtension extends Extension
if (!$container->hasDefinition('doctrine.odm.mongodb.metadata.annotation')) {
// Load DoctrineMongoDBBundle/Resources/config/mongodb.xml
$loader = new XmlFileLoader($container, __DIR__.'/../Resources/config');
$loader->load($this->resources['mongodb']);
$loader->load('mongodb.xml');
}
// Allow these application configuration options to override the defaults

View File

@ -10,10 +10,6 @@ use Symfony\Component\DependencyInjection\Reference;
class PropelExtension extends Extension
{
protected $resources = array(
'propel' => 'propel.xml',
);
/**
* Loads the Propel configuration.
*
@ -24,7 +20,7 @@ class PropelExtension extends Extension
{
if (!$container->hasDefinition('propel')) {
$loader = new XmlFileLoader($container, __DIR__.'/../Resources/config');
$loader->load($this->resources['propel']);
$loader->load('propel.xml');
}
if (!$container->hasParameter('propel.path')) {
@ -54,7 +50,7 @@ class PropelExtension extends Extension
{
if (!$container->hasDefinition('propel')) {
$loader = new XmlFileLoader($container, __DIR__.'/../Resources/config');
$loader->load($this->resources['propel']);
$loader->load('propel.xml');
}
$defaultConnection = array(

View File

@ -23,10 +23,6 @@ use Symfony\Component\DependencyInjection\Reference;
*/
class SwiftMailerExtension extends Extension
{
protected $resources = array(
'mailer' => 'swiftmailer.xml',
);
/**
* Loads the Swift Mailer configuration.
*
@ -45,7 +41,7 @@ class SwiftMailerExtension extends Extension
{
if (!$container->hasDefinition('swiftmailer.mailer')) {
$loader = new XmlFileLoader($container, __DIR__.'/../Resources/config');
$loader->load($this->resources['mailer']);
$loader->load('swiftmailer.xml');
$container->setAlias('mailer', 'swiftmailer.mailer');
}