Change Knplabs to Knp. BC break before Symfony2 release.
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace Knplabs\Bundle\GaufretteBundle\DependencyInjection\Compiler;
|
||||
namespace Knp\Bundle\GaufretteBundle\DependencyInjection\Compiler;
|
||||
|
||||
use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface;
|
||||
use Symfony\Component\DependencyInjection\ContainerBuilder;
|
||||
@@ -15,11 +15,11 @@ class AdapterFactoryManagerPass implements CompilerPassInterface
|
||||
{
|
||||
public function process(ContainerBuilder $container)
|
||||
{
|
||||
if (!$container->hasDefinition('knplabs_gaufrette.adapter_factory_manager')) {
|
||||
if (!$container->hasDefinition('knp_gaufrette.adapter_factory_manager')) {
|
||||
return;
|
||||
}
|
||||
|
||||
$definition = $container->getDefinition('knplabs_gaufrette.adapter_factory_manager');
|
||||
$definition = $container->getDefinition('knp_gaufrette.adapter_factory_manager');
|
||||
|
||||
$calls = $definition->getMethodCalls();
|
||||
$definition->setMethodCalls(array());
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace Knplabs\Bundle\GaufretteBundle\DependencyInjection\Compiler;
|
||||
namespace Knp\Bundle\GaufretteBundle\DependencyInjection\Compiler;
|
||||
|
||||
use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface;
|
||||
use Symfony\Component\DependencyInjection\ContainerBuilder;
|
||||
@@ -15,11 +15,11 @@ class AdapterManagerPass implements CompilerPassInterface
|
||||
{
|
||||
public function process(ContainerBuilder $container)
|
||||
{
|
||||
if (!$container->hasDefinition('knplabs_gaufrette.adapter_manager')) {
|
||||
if (!$container->hasDefinition('knp_gaufrette.adapter_manager')) {
|
||||
return;
|
||||
}
|
||||
|
||||
$definition = $container->getDefinition('knplabs_gaufrette.adapter_manager');
|
||||
$definition = $container->getDefinition('knp_gaufrette.adapter_manager');
|
||||
$calls = $definition->getMethodCalls();
|
||||
$definition->setMethodCalls(array());
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace Knplabs\Bundle\GaufretteBundle\DependencyInjection\Factory;
|
||||
namespace Knp\Bundle\GaufretteBundle\DependencyInjection\Factory;
|
||||
|
||||
use Symfony\Component\Config\Definition\Builder\NodeDefinition;
|
||||
use Symfony\Component\DependencyInjection\ContainerBuilder;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace Knplabs\Bundle\GaufretteBundle\DependencyInjection\Factory;
|
||||
namespace Knp\Bundle\GaufretteBundle\DependencyInjection\Factory;
|
||||
|
||||
use Symfony\Component\Config\Definition\Builder\NodeDefinition;
|
||||
use Symfony\Component\DependencyInjection\ContainerBuilder;
|
||||
@@ -19,7 +19,7 @@ class InMemoryAdapterFactory implements AdapterFactoryInterface
|
||||
public function create(ContainerBuilder $container, $id, array $config)
|
||||
{
|
||||
$container
|
||||
->setDefinition($id, new DefinitionDecorator('knplabs_gaufrette.adapter.in_memory'))
|
||||
->setDefinition($id, new DefinitionDecorator('knp_gaufrette.adapter.in_memory'))
|
||||
->replaceArgument(0, $config['files'])
|
||||
;
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace Knplabs\Bundle\GaufretteBundle\DependencyInjection\Factory;
|
||||
namespace Knp\Bundle\GaufretteBundle\DependencyInjection\Factory;
|
||||
|
||||
use Symfony\Component\Config\Definition\Builder\NodeDefinition;
|
||||
use Symfony\Component\DependencyInjection\ContainerBuilder;
|
||||
@@ -19,7 +19,7 @@ class LocalAdapterFactory implements AdapterFactoryInterface
|
||||
public function create(ContainerBuilder $container, $id, array $config)
|
||||
{
|
||||
$container
|
||||
->setDefinition($id, new DefinitionDecorator('knplabs_gaufrette.adapter.local'))
|
||||
->setDefinition($id, new DefinitionDecorator('knp_gaufrette.adapter.local'))
|
||||
->replaceArgument(0, $config['directory'])
|
||||
->replaceArgument(1, $config['create'])
|
||||
;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace Knplabs\Bundle\GaufretteBundle\DependencyInjection\Factory;
|
||||
namespace Knp\Bundle\GaufretteBundle\DependencyInjection\Factory;
|
||||
|
||||
use Symfony\Component\Config\Definition\Builder\NodeDefinition;
|
||||
use Symfony\Component\DependencyInjection\ContainerBuilder;
|
||||
@@ -19,7 +19,7 @@ class SafeLocalAdapterFactory implements AdapterFactoryInterface
|
||||
public function create(ContainerBuilder $container, $id, array $config)
|
||||
{
|
||||
$container
|
||||
->setDefinition($id, new DefinitionDecorator('knplabs_gaufrette.adapter.safe_local'))
|
||||
->setDefinition($id, new DefinitionDecorator('knp_gaufrette.adapter.safe_local'))
|
||||
->replaceArgument(0, $config['directory'])
|
||||
->replaceArgument(1, $config['create'])
|
||||
;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace Knplabs\Bundle\GaufretteBundle\DependencyInjection\Factory;
|
||||
namespace Knp\Bundle\GaufretteBundle\DependencyInjection\Factory;
|
||||
|
||||
use Symfony\Component\Config\Definition\Builder\NodeDefinition;
|
||||
use Symfony\Component\DependencyInjection\ContainerBuilder;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace Knplabs\Bundle\GaufretteBundle\DependencyInjection;
|
||||
namespace Knp\Bundle\GaufretteBundle\DependencyInjection;
|
||||
|
||||
use Symfony\Component\Config\Definition\Builder\TreeBuilder;
|
||||
use Symfony\Component\Config\Definition\ConfigurationInterface;
|
||||
@@ -22,7 +22,7 @@ class FactoryConfiguration implements ConfigurationInterface
|
||||
$treeBuilder = new TreeBuilder();
|
||||
|
||||
$treeBuilder
|
||||
->root('knplabs_gaufrette')
|
||||
->root('knp_gaufrette')
|
||||
->ignoreExtraKeys()
|
||||
->fixXmlConfig('factory', 'factories')
|
||||
->children()
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace Knplabs\Bundle\GaufretteBundle\DependencyInjection;
|
||||
namespace Knp\Bundle\GaufretteBundle\DependencyInjection;
|
||||
|
||||
use Symfony\Component\Config\Definition\Processor;
|
||||
use Symfony\Component\Config\FileLocator;
|
||||
@@ -15,7 +15,7 @@ use Symfony\Component\HttpKernel\DependencyInjection\Extension;
|
||||
*
|
||||
* @author Antoine Hérault <antoine.herault@gmail.com>
|
||||
*/
|
||||
class KnplabsGaufretteExtension extends Extension
|
||||
class KnpGaufretteExtension extends Extension
|
||||
{
|
||||
private $factories = null;
|
||||
|
||||
@@ -50,7 +50,7 @@ class KnplabsGaufretteExtension extends Extension
|
||||
$map[$name] = $this->createFilesystem($name, $filesystem, $container, $adapters);
|
||||
}
|
||||
|
||||
$container->getDefinition('knplabs_gaufrette.filesystem_map')
|
||||
$container->getDefinition('knp_gaufrette.filesystem_map')
|
||||
->replaceArgument(0, $map);
|
||||
}
|
||||
|
||||
@@ -82,7 +82,7 @@ class KnplabsGaufretteExtension extends Extension
|
||||
$id = sprintf('gaufrette.%s_filesystem', $name);
|
||||
|
||||
$container
|
||||
->setDefinition($id, new DefinitionDecorator('knplabs_gaufrette.filesystem'))
|
||||
->setDefinition($id, new DefinitionDecorator('knp_gaufrette.filesystem'))
|
||||
->replaceArgument(0, new Reference($adapter))
|
||||
;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace Knplabs\Bundle\GaufretteBundle\DependencyInjection;
|
||||
namespace Knp\Bundle\GaufretteBundle\DependencyInjection;
|
||||
|
||||
use Symfony\Component\Config\Definition\Builder\ArrayNodeDefinition;
|
||||
use Symfony\Component\Config\Definition\Builder\TreeBuilder;
|
||||
@@ -33,7 +33,7 @@ class MainConfiguration implements ConfigurationInterface
|
||||
public function getConfigTreeBuilder()
|
||||
{
|
||||
$treeBuilder = new TreeBuilder();
|
||||
$rootNode = $treeBuilder->root('knplabs_gaufrette');
|
||||
$rootNode = $treeBuilder->root('knp_gaufrette');
|
||||
|
||||
$this->addAdaptersSection($rootNode, $this->factories);
|
||||
$this->addFilesystemsSection($rootNode);
|
||||
|
||||
Reference in New Issue
Block a user