Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Rebrand CouchDB as Doctrine Bundle, add small README

  • Loading branch information...
commit 8ca1c8693d9acdfd6bd7147a17fc9f3ecb224f1f 1 parent a8ee409
@beberlei beberlei authored
View
2  DependencyInjection/Compiler/RegisterEventListenersAndSubscribersPass.php
@@ -9,7 +9,7 @@
* with this source code in the file LICENSE.
*/
-namespace Symfony\Bundle\DoctrineCouchDBBundle\DependencyInjection\Compiler;
+namespace Doctrine\Bundle\CouchDBBundle\DependencyInjection\Compiler;
use Symfony\Component\DependencyInjection\Reference;
use Symfony\Component\DependencyInjection\ContainerBuilder;
View
2  DependencyInjection/Configuration.php
@@ -9,7 +9,7 @@
* file that was distributed with this source code.
*/
-namespace Symfony\Bundle\DoctrineCouchDBBundle\DependencyInjection;
+namespace Doctrine\Bundle\CouchDBBundle\DependencyInjection;
use Symfony\Component\Config\Definition\Builder\ArrayNodeDefinition;
use Symfony\Component\Config\Definition\Builder\TreeBuilder;
View
6 DependencyInjection/DoctrineCouchDBExtension.php
@@ -9,7 +9,7 @@
* file that was distributed with this source code.
*/
-namespace Symfony\Bundle\DoctrineCouchDBBundle\DependencyInjection;
+namespace Doctrine\Bundle\CouchDBBundle\DependencyInjection;
use Symfony\Component\DependencyInjection\Alias;
use Symfony\Component\DependencyInjection\Loader\XmlFileLoader;
@@ -235,7 +235,7 @@ protected function getObjectManagerElementName($name)
protected function getMappingObjectDefaultName()
{
- return 'CouchDocument';
+ return 'Document';
}
protected function getMappingResourceConfigDirectory()
@@ -245,6 +245,6 @@ protected function getMappingResourceConfigDirectory()
protected function getMappingResourceExtension()
{
- return 'couch';
+ return 'couchdb';
}
}
View
4 DoctrineCouchDBBundle.php
@@ -9,12 +9,12 @@
* file that was distributed with this source code.
*/
-namespace Symfony\Bundle\DoctrineCouchDBBundle;
+namespace Doctrine\Bundle\CouchDBBundle;
use Symfony\Component\HttpKernel\Bundle\Bundle;
use Symfony\Component\DependencyInjection\Compiler\PassConfig;
use Symfony\Component\DependencyInjection\ContainerBuilder;
-use Symfony\Bundle\DoctrineCouchDBBundle\DependencyInjection\Compiler\RegisterEventListenersAndSubscribersPass;
+use Doctrine\Bundle\CouchDBBundle\DependencyInjection\Compiler\RegisterEventListenersAndSubscribersPass;
class DoctrineCouchDBBundle extends Bundle
{
View
34 README.md
@@ -0,0 +1,34 @@
+# Doctrine CouchDB Bundle
+
+This bundle integrates Doctrine CouchDB ODM and Clients into Symfony2.
+
+## Configuration
+
+The configuration is similar to Doctrine ORM and MongoDB configuration for Symfony2 as its based
+on the AbstractDoctrineBundle aswell:
+
+ doctrine_couch_db:
+ client:
+ dbname: symfony
+ odm:
+ auto_mapping: true
+
+## Services
+
+You can access to CouchDB services:
+
+ <?php
+
+ namespace Acme\DemoBundle\Controller;
+
+ use Symfony\Bundle\FrameworkBundle\Controller\Controller;
+
+ class DefaultController extends Controller
+ {
+ public function indexAction()
+ {
+ $client = $this->container->get('doctrine_couchdb.client.default_connection');
+ $documentManager = $this->container->get('doctrine_couchdb.odm.default_document_manager');
+ }
+ }
+
View
6 Tests/BundleTest.php
@@ -9,9 +9,9 @@
* file that was distributed with this source code.
*/
-namespace Symfony\Bundle\DoctrineCouchDBBundle\Tests;
+namespace Doctrine\Bundle\CouchDBBundle\Tests;
-use Symfony\Bundle\DoctrineCouchDBBundle\DoctrineCouchDBBundle;
+use Doctrine\Bundle\CouchDBBundle\DoctrineCouchDBBundle;
use Symfony\Component\DependencyInjection\Compiler\PassConfig;
class BundleTest extends TestCase
@@ -23,7 +23,7 @@ public function testRegisterEventListener()
$builder->expects($this->once())
->method('addCompilerPass')
->with(
- $this->isInstanceOf('Symfony\Bundle\DoctrineCouchDBBundle\DependencyInjection\Compiler\RegisterEventListenersAndSubscribersPass'),
+ $this->isInstanceOf('Doctrine\Bundle\CouchDBBundle\DependencyInjection\Compiler\RegisterEventListenersAndSubscribersPass'),
$this->equalTo(PassConfig::TYPE_BEFORE_OPTIMIZATION)
);
View
4 Tests/ContainerTest.php
@@ -9,7 +9,7 @@
* file that was distributed with this source code.
*/
-namespace Symfony\Bundle\DoctrineCouchDBBundle\Tests;
+namespace Doctrine\Bundle\CouchDBBundle\Tests;
use Symfony\Bundle\DoctrineBundle\Annotations\IndexedReader;
@@ -20,7 +20,7 @@
use Symfony\Component\DependencyInjection\ParameterBag\ParameterBag;
use Symfony\Component\DependencyInjection\Loader\YamlFileLoader;
use Symfony\Component\DependencyInjection\Compiler\ResolveDefinitionTemplatesPass;
-use Symfony\Bundle\DoctrineCouchDBBundle\DependencyInjection\DoctrineCouchDBExtension;
+use Doctrine\Bundle\CouchDBBundle\DependencyInjection\DoctrineCouchDBExtension;
class ContainerTest extends TestCase
{
View
6 Tests/DependencyInjection/AbstractDoctrineExtensionTest.php
@@ -9,10 +9,10 @@
* file that was distributed with this source code.
*/
-namespace Symfony\Bundle\DoctrineCouchDBBundle\Tests\DependencyInjection;
+namespace Doctrine\Bundle\CouchDBBundle\Tests\DependencyInjection;
-use Symfony\Bundle\DoctrineCouchDBBundle\Tests\TestCase;
-use Symfony\Bundle\DoctrineCouchDBBundle\DependencyInjection\DoctrineCouchDBExtension;
+use Doctrine\Bundle\CouchDBBundle\Tests\TestCase;
+use Doctrine\Bundle\CouchDBBundle\DependencyInjection\DoctrineCouchDBExtension;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\ParameterBag\ParameterBag;
use Symfony\Component\DependencyInjection\Loader\XmlFileLoader;
View
4 Tests/DependencyInjection/ConfigurationTest.php
@@ -9,9 +9,9 @@
* file that was distributed with this source code.
*/
-namespace Symfony\Bundle\DoctrineCouchDBBundle\Tests\DependencyInjection;
+namespace Doctrine\Bundle\CouchDBBundle\Tests\DependencyInjection;
-use Symfony\Bundle\DoctrineCouchDBBundle\DependencyInjection\Configuration;
+use Doctrine\Bundle\CouchDBBundle\DependencyInjection\Configuration;
use Symfony\Component\Config\Definition\Processor;
class ConfigurationTest extends \PHPUnit_Framework_TestCase
View
2  Tests/DependencyInjection/XmlDoctrineExtensionTest.php
@@ -9,7 +9,7 @@
* file that was distributed with this source code.
*/
-namespace Symfony\Bundle\DoctrineCouchDBBundle\Tests\DependencyInjection;
+namespace Doctrine\Bundle\CouchDBBundle\Tests\DependencyInjection;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\Loader\XmlFileLoader;
View
2  Tests/DependencyInjection/YamlDoctrineExtensionTest.php
@@ -9,7 +9,7 @@
* file that was distributed with this source code.
*/
-namespace Symfony\Bundle\DoctrineCouchDBBundle\Tests\DependencyInjection;
+namespace Doctrine\Bundle\CouchDBBundle\Tests\DependencyInjection;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\Loader\YamlFileLoader;
View
2  Tests/TestCase.php
@@ -9,7 +9,7 @@
* file that was distributed with this source code.
*/
-namespace Symfony\Bundle\DoctrineCouchDBBundle\Tests;
+namespace Doctrine\Bundle\CouchDBBundle\Tests;
abstract class TestCase extends \PHPUnit_Framework_TestCase
{
Please sign in to comment.
Something went wrong with that request. Please try again.