static public function createOdm( $database, $host = 'localhost', $port = '5984', $username = null, $password = null, array $path = array(), $namespace = 'Doctrine\ODM\CouchDB\Mapping\\') { $driver = self::loadDriverForDocuments($path, $namespace); $config = new Configuration(); $config->setDatabase($database); $config->setMetadataDriverImpl($driver); $httpClient = new SocketClient($host, $port, $username, $password); $config->setHttpClient($httpClient); return DocumentManager::create($config); }