Upgraded to Symfony 2.1-beta2
This commit is contained in:
@@ -41,9 +41,7 @@ class Configuration implements ConfigurationInterface
|
||||
}
|
||||
|
||||
/**
|
||||
* Generates the configuration tree builder.
|
||||
*
|
||||
* @return \Symfony\Component\Config\Definition\Builder\TreeBuilder The tree builder
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public function getConfigTreeBuilder()
|
||||
{
|
||||
@@ -56,6 +54,11 @@ class Configuration implements ConfigurationInterface
|
||||
return $treeBuilder;
|
||||
}
|
||||
|
||||
/**
|
||||
* Add DBAL section to configuration tree
|
||||
*
|
||||
* @param ArrayNodeDefinition $node
|
||||
*/
|
||||
private function addDbalSection(ArrayNodeDefinition $node)
|
||||
{
|
||||
$node
|
||||
@@ -105,6 +108,11 @@ class Configuration implements ConfigurationInterface
|
||||
;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the dbal connections node
|
||||
*
|
||||
* @return ArrayNodeDefinition
|
||||
*/
|
||||
private function getDbalConnectionsNode()
|
||||
{
|
||||
$treeBuilder = new TreeBuilder();
|
||||
@@ -157,7 +165,7 @@ class Configuration implements ConfigurationInterface
|
||||
*
|
||||
* These keys are available for slave configurations too.
|
||||
*
|
||||
* @param \Symfony\Component\Config\Definition\Builder\ArrayNodeDefinition $node
|
||||
* @param ArrayNodeDefinition $node
|
||||
*/
|
||||
private function configureDbalDriverNode(ArrayNodeDefinition $node)
|
||||
{
|
||||
@@ -202,6 +210,11 @@ class Configuration implements ConfigurationInterface
|
||||
;
|
||||
}
|
||||
|
||||
/**
|
||||
* Add the ORM section to configuration tree
|
||||
*
|
||||
* @param ArrayNodeDefinition $node
|
||||
*/
|
||||
private function addOrmSection(ArrayNodeDefinition $node)
|
||||
{
|
||||
$node
|
||||
@@ -246,6 +259,11 @@ class Configuration implements ConfigurationInterface
|
||||
;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return ORM target entity resolver node
|
||||
*
|
||||
* @return \Symfony\Component\Config\Definition\Builder\NodeDefinition
|
||||
*/
|
||||
private function getOrmTargetEntityResolverNode()
|
||||
{
|
||||
$treeBuilder = new TreeBuilder();
|
||||
@@ -261,6 +279,11 @@ class Configuration implements ConfigurationInterface
|
||||
return $node;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return ORM entity manager node
|
||||
*
|
||||
* @return ArrayNodeDefinition
|
||||
*/
|
||||
private function getOrmEntityManagersNode()
|
||||
{
|
||||
$treeBuilder = new TreeBuilder();
|
||||
@@ -362,6 +385,13 @@ class Configuration implements ConfigurationInterface
|
||||
return $node;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return a ORM cache driver node for an given entity manager
|
||||
*
|
||||
* @param string $name
|
||||
*
|
||||
* @return ArrayNodeDefinition
|
||||
*/
|
||||
private function getOrmCacheDriverNode($name)
|
||||
{
|
||||
$treeBuilder = new TreeBuilder();
|
||||
|
@@ -32,6 +32,9 @@ use Symfony\Component\Config\FileLocator;
|
||||
*/
|
||||
class DoctrineExtension extends AbstractDoctrineExtension
|
||||
{
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public function load(array $configs, ContainerBuilder $container)
|
||||
{
|
||||
$configuration = $this->getConfiguration($configs, $container);
|
||||
@@ -377,6 +380,9 @@ class DoctrineExtension extends AbstractDoctrineExtension
|
||||
$ormConfigDef->addMethodCall('setEntityNamespaces', array($this->aliasMap));
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
protected function getObjectManagerElementName($name)
|
||||
{
|
||||
return 'doctrine.orm.'.$name;
|
||||
@@ -387,11 +393,17 @@ class DoctrineExtension extends AbstractDoctrineExtension
|
||||
return 'Entity';
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
protected function getMappingResourceConfigDirectory()
|
||||
{
|
||||
return 'Resources/config/doctrine';
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
protected function getMappingResourceExtension()
|
||||
{
|
||||
return 'orm';
|
||||
@@ -411,9 +423,7 @@ class DoctrineExtension extends AbstractDoctrineExtension
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the base path for the XSD files.
|
||||
*
|
||||
* @return string The XSD base path
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public function getXsdValidationBasePath()
|
||||
{
|
||||
@@ -421,15 +431,16 @@ class DoctrineExtension extends AbstractDoctrineExtension
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the namespace to be used for this extension (XML namespace).
|
||||
*
|
||||
* @return string The XML namespace
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public function getNamespace()
|
||||
{
|
||||
return 'http://symfony.com/schema/dic/doctrine';
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public function getConfiguration(array $config, ContainerBuilder $container)
|
||||
{
|
||||
return new Configuration($container->getParameter('kernel.debug'));
|
||||
|
Reference in New Issue
Block a user