Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Symfony Bundle for DoctrineCouchDB
PHP
tree: 891ae44cd1

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
CacheWarmer
DataCollector
DependencyInjection
Mapping/Driver
Resources
Tests
DoctrineCouchDBBundle.php
README.md

README.md

Doctrine CouchDB Bundle

This bundle integrates Doctrine CouchDB ODM and Clients into Symfony2.

Installation

  • Grab this repository and Doctrine CouchDB ODM into your Symfony project
  • Add Doctrine\Bundle\CouchDBBundle\DoctrineCouchDBBundle to your Kernel#registerBundles() method
  • Add autoloader for Doctrine\CouchDB, Doctrine\ODM\CouchDB and Doctrine\Bundle namespaces

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');
    }
}
Something went wrong with that request. Please try again.