Skip to content

Commit

Permalink
Updated to match the latest Symfony changes
Browse files Browse the repository at this point in the history
  • Loading branch information
stof committed Feb 16, 2011
1 parent 4ea7b80 commit 6fd574b
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 15 deletions.
2 changes: 1 addition & 1 deletion DependencyInjection/Configuration.php
Expand Up @@ -15,7 +15,7 @@ class Configuration
public function getConfigTree()
{
$treeBuilder = new TreeBuilder();
$rootNode = $treeBuilder->root('stof_doctrine_extension:config', 'array');
$rootNode = $treeBuilder->root('stof_doctrine_extensions', 'array');

$this->addVendorConfig($rootNode, 'orm');
$this->addVendorConfig($rootNode, 'mongodb');
Expand Down
Expand Up @@ -8,12 +8,12 @@
use Symfony\Component\Config\FileLocator;
use Symfony\Component\DependencyInjection\ContainerBuilder;

class DoctrineExtensionsExtension extends Extension
class StofDoctrineExtensionsExtension extends Extension
{
protected $entityManagers = array();
protected $documentManagers = array();

public function configLoad(array $configs, ContainerBuilder $container)
public function load(array $configs, ContainerBuilder $container)
{
$processor = new Processor();
$configuration = new Configuration();
Expand Down
21 changes: 11 additions & 10 deletions Resources/doc/index.rst
Expand Up @@ -75,15 +75,16 @@ See the official documentation_ for details.
for ORM::

# app/config.yml
doctrine.orm:
mappings:
StofDoctrineExtensionsBundle: ~
# ... your others bundle
doctrine:
orm:
mappings:
StofDoctrineExtensionsBundle: ~
# ... your others bundle

or for MongoDB ODM::

# app/config.yml
doctrine_odm.mongodb:
doctrine_mongo_db:
mappings:
StofDoctrineExtensionsBundle: ~
# ... your others bundle
Expand All @@ -106,15 +107,15 @@ default).
in YAML::

# app/config.yml
app.config:
framework:
session:
default_locale: en_US

or in XML::

<!-- app/config.xml -->
<container>
<app:config>
<framework:config>
<app:session default-locale="en_US">
</app:config>
</container>
Expand All @@ -130,7 +131,7 @@ manager when using mongoDB
in YAML::

# app/config.yml
stof_doctrine_extensions.config:
stof_doctrine_extensions:
orm:
default: ~
mongodb:
Expand Down Expand Up @@ -214,7 +215,7 @@ some of them explicitely.
in YAML::

# app/config.yml
stof_doctrine_extensions.config:
stof_doctrine_extensions:
orm:
default:
tree: false
Expand Down Expand Up @@ -260,7 +261,7 @@ in the configuration.
in YAML::

# app/config.yml
stof_doctrine_extensions.config:
stof_doctrine_extensions:
class:
orm:
tree: MyBundle\TreeListener
Expand Down
4 changes: 2 additions & 2 deletions StofDoctrineExtensionsBundle.php
Expand Up @@ -11,9 +11,9 @@ class StofDoctrineExtensionsBundle extends Bundle
/**
* {@inheritdoc}
*/
public function registerExtensions(ContainerBuilder $container)
public function build(ContainerBuilder $container)
{
parent::registerExtensions($container);
parent::build($container);
$container->addCompilerPass(new ValidateExtensionConfigurationPass());
}
}

0 comments on commit 6fd574b

Please sign in to comment.