diff --git a/Command/FilesystemKeysCommand.php b/Command/FilesystemKeysCommand.php index 5cb099a..84b10cc 100644 --- a/Command/FilesystemKeysCommand.php +++ b/Command/FilesystemKeysCommand.php @@ -1,6 +1,6 @@ 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()); diff --git a/DependencyInjection/Compiler/AdapterManagerPass.php b/DependencyInjection/Compiler/AdapterManagerPass.php index 37e1060..1c7f6ae 100644 --- a/DependencyInjection/Compiler/AdapterManagerPass.php +++ b/DependencyInjection/Compiler/AdapterManagerPass.php @@ -1,6 +1,6 @@ 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()); diff --git a/DependencyInjection/Factory/AdapterFactoryInterface.php b/DependencyInjection/Factory/AdapterFactoryInterface.php index 0fc8ad4..02fed71 100644 --- a/DependencyInjection/Factory/AdapterFactoryInterface.php +++ b/DependencyInjection/Factory/AdapterFactoryInterface.php @@ -1,6 +1,6 @@ setDefinition($id, new DefinitionDecorator('knplabs_gaufrette.adapter.in_memory')) + ->setDefinition($id, new DefinitionDecorator('knp_gaufrette.adapter.in_memory')) ->replaceArgument(0, $config['files']) ; } diff --git a/DependencyInjection/Factory/LocalAdapterFactory.php b/DependencyInjection/Factory/LocalAdapterFactory.php index 75bb526..3850af7 100644 --- a/DependencyInjection/Factory/LocalAdapterFactory.php +++ b/DependencyInjection/Factory/LocalAdapterFactory.php @@ -1,6 +1,6 @@ setDefinition($id, new DefinitionDecorator('knplabs_gaufrette.adapter.local')) + ->setDefinition($id, new DefinitionDecorator('knp_gaufrette.adapter.local')) ->replaceArgument(0, $config['directory']) ->replaceArgument(1, $config['create']) ; diff --git a/DependencyInjection/Factory/SafeLocalAdapterFactory.php b/DependencyInjection/Factory/SafeLocalAdapterFactory.php index aa670e4..92c05cd 100644 --- a/DependencyInjection/Factory/SafeLocalAdapterFactory.php +++ b/DependencyInjection/Factory/SafeLocalAdapterFactory.php @@ -1,6 +1,6 @@ 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']) ; diff --git a/DependencyInjection/Factory/ServiceAdapterFactory.php b/DependencyInjection/Factory/ServiceAdapterFactory.php index 5578caa..243af64 100644 --- a/DependencyInjection/Factory/ServiceAdapterFactory.php +++ b/DependencyInjection/Factory/ServiceAdapterFactory.php @@ -1,6 +1,6 @@ root('knplabs_gaufrette') + ->root('knp_gaufrette') ->ignoreExtraKeys() ->fixXmlConfig('factory', 'factories') ->children() diff --git a/DependencyInjection/KnplabsGaufretteExtension.php b/DependencyInjection/KnpGaufretteExtension.php similarity index 93% rename from DependencyInjection/KnplabsGaufretteExtension.php rename to DependencyInjection/KnpGaufretteExtension.php index 2551c91..a0c7134 100644 --- a/DependencyInjection/KnplabsGaufretteExtension.php +++ b/DependencyInjection/KnpGaufretteExtension.php @@ -1,6 +1,6 @@ */ -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)) ; diff --git a/DependencyInjection/MainConfiguration.php b/DependencyInjection/MainConfiguration.php index 2e6187c..381efbc 100644 --- a/DependencyInjection/MainConfiguration.php +++ b/DependencyInjection/MainConfiguration.php @@ -1,6 +1,6 @@ root('knplabs_gaufrette'); + $rootNode = $treeBuilder->root('knp_gaufrette'); $this->addAdaptersSection($rootNode, $this->factories); $this->addFilesystemsSection($rootNode); diff --git a/FilesystemMap.php b/FilesystemMap.php index 78b4b51..5cf9de1 100644 --- a/FilesystemMap.php +++ b/FilesystemMap.php @@ -1,6 +1,6 @@ */ -class KnplabsGaufretteBundle extends Bundle +class KnpGaufretteBundle extends Bundle { } diff --git a/README.markdown b/README.markdown index d132d3a..56f9bee 100644 --- a/README.markdown +++ b/README.markdown @@ -20,15 +20,15 @@ As this bundle is an integration for Symfony of the [Gaufrette][gaufrette-homepa ## Download the bundle -You can download an archive of the bundle and unpack it in the `vendor/bundles/Knplabs/Bundle/GaufretteBundle` directory of your application. +You can download an archive of the bundle and unpack it in the `vendor/bundles/Knp/Bundle/GaufretteBundle` directory of your application. If you are versioning your project with git, you had better to embed it as a submodule: - $ git submodule add https://github.com/knplabs/GaufretteBundle.git vendor/bundles/Knplabs/Bundle/GaufretteBundle + $ git submodule add https://github.com/knplabs/KnpGaufretteBundle.git vendor/bundles/Knp/Bundle/GaufretteBundle ## Add the namespace in the autoloader -If the `Knplabs` namespace is not already defined in your autoloader, you must add it: +If the `Knp` namespace is not already defined in your autoloader, you must add it: ``` php registerNamespaces(array( - 'Knplabs\Bundle' => __DIR__.'/../vendor/bundles' + 'Knp\Bundle' => __DIR__.'/../vendor/bundles' // ... @@ -59,7 +59,7 @@ public function registerBundles() // ... - new Knplabs\Bundle\GaufretteBundle\KnplabsGaufretteBundle() + new Knp\Bundle\GaufretteBundle\KnpGaufretteBundle() ); // ... @@ -78,7 +78,7 @@ The configuration of the Gaufrette bundle is divided into two parts: the `adapte ``` yaml # app/config/config.yml -knplabs_gaufrette: +knp_gaufrette: adapters: foo: local: @@ -91,7 +91,7 @@ The defined adapters are usable to create the filesystems. ``` yaml # app/config/config.yml -knplabs_gaufrette: +knp_gaufrette: adapters: # ... filesystems: @@ -111,7 +111,7 @@ You can access to all declared filesystems through the map service. In the previous exemple, we declared a `bar` filesystem: ``` php -$container->get('knplabs_gaufrette.filesystem_map')->get('bar'); +$container->get('knp_gaufrette.filesystem_map')->get('bar'); ``` Returns the instance of `Gaufrette\Filesystem` for `bar`. @@ -132,7 +132,7 @@ A simple local filesystem based adapter. ``` yaml # app/config/config.yml -knplabs_gaufrette: +knp_gaufrette: adapters: foo: local: @@ -153,7 +153,7 @@ Almost as simple as the **local** adapter, but it encodes key to avoid having to ``` yaml # app/config/config.yml -knplabs_gaufrette: +knp_gaufrette: adapters: foo: safe_local: @@ -173,7 +173,7 @@ Allows you to use a user defined adapter service. ``` yaml # app/config/config.yml -knplabs_gaufrette: +knp_gaufrette: adapters: foo: service: @@ -194,7 +194,7 @@ The `files` is an array of files where each file is a sub-array having the `cont ``` yaml # app/config/config.yml -knplabs_gaufrette: +knp_gaufrette: adapters: foo: in_memory: diff --git a/Resources/config/adapter_factories.xml b/Resources/config/adapter_factories.xml index 65e9668..415e87e 100644 --- a/Resources/config/adapter_factories.xml +++ b/Resources/config/adapter_factories.xml @@ -5,16 +5,16 @@ xsi:schemaLocation="http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd"> - + - + - + - + diff --git a/Resources/config/gaufrette.xml b/Resources/config/gaufrette.xml index 374fbf9..886ecc8 100644 --- a/Resources/config/gaufrette.xml +++ b/Resources/config/gaufrette.xml @@ -5,21 +5,21 @@ xsi:schemaLocation="http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd"> - + - + - + - + - + diff --git a/Tests/FunctionalTest.php b/Tests/FunctionalTest.php index 26620ca..8ab63a0 100644 --- a/Tests/FunctionalTest.php +++ b/Tests/FunctionalTest.php @@ -1,6 +1,6 @@