PK CV>\@7 7 phpunit.xml.distnu W+A
./tests/Doctrine/Tests/CouchDB
PK CVr&
composer.locknu W+A {
"_readme": [
"This file locks the dependencies of your project to a known state",
"Read more about it at http://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file"
],
"hash": "ecfe6be48dffe89867613aae861ac79f",
"packages": [
{
"name": "doctrine/common",
"version": "2.3.0",
"source": {
"type": "git",
"url": "https://github.com/doctrine/common",
"reference": "2.3.0"
},
"dist": {
"type": "zip",
"url": "https://github.com/doctrine/common/zipball/2.3.0",
"reference": "2.3.0",
"shasum": ""
},
"require": {
"php": ">=5.3.2"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "2.3.x-dev"
}
},
"autoload": {
"psr-0": {
"Doctrine\\Common": "lib/"
}
},
"license": [
"MIT"
],
"authors": [
{
"name": "Jonathan Wage",
"email": "jonwage@gmail.com",
"homepage": "http://www.jwage.com/"
},
{
"name": "Guilherme Blanco",
"email": "guilhermeblanco@gmail.com",
"homepage": "http://www.instaclick.com"
},
{
"name": "Roman Borschel",
"email": "roman@code-factory.org"
},
{
"name": "Benjamin Eberlei",
"email": "kontakt@beberlei.de"
},
{
"name": "Johannes Schmitt",
"email": "schmittjoh@gmail.com",
"homepage": "http://jmsyst.com",
"role": "Developer of wrapped JMSSerializerBundle"
}
],
"description": "Common Library for Doctrine projects",
"homepage": "http://www.doctrine-project.org",
"keywords": [
"annotations",
"collections",
"eventmanager",
"persistence",
"spl"
],
"time": "2012-09-19 22:55:18"
}
],
"packages-dev": [
],
"aliases": [
],
"minimum-stability": "stable",
"stability-flags": {
"doctrine/common": 0
},
"platform": {
"php": ">=5.3.2"
},
"platform-dev": [
]
}
PK CV * lib/Doctrine/CouchDB/Utils/BulkUpdater.phpnu W+A .
*/
namespace Doctrine\CouchDB\Utils;
use Doctrine\CouchDB\HTTP\Client;
/**
* Bulk updater class
*
* @license http://www.opensource.org/licenses/lgpl-license.php LGPL
* @link www.doctrine-project.com
* @since 1.0
* @author Benjamin Eberlei
*/
class BulkUpdater
{
private $data = array('docs' => array());
private $httpClient;
private $databaseName;
public function __construct(Client $httpClient, $databaseName)
{
$this->httpClient = $httpClient;
$this->databaseName = $databaseName;
}
public function setAllOrNothing($allOrNothing)
{
$this->data['all_or_nothing'] = (bool)$allOrNothing;
}
public function updateDocument($data)
{
$this->data['docs'][] = $data;
}
public function deleteDocument($id, $rev)
{
$this->data['docs'][] = array('_id' => $id, '_rev' => $rev, '_deleted' => true);
}
public function execute()
{
return $this->httpClient->request('POST', $this->getPath(), json_encode($this->data));
}
public function getPath()
{
return '/' . $this->databaseName . '/_bulk_docs';
}
}
PK CVw3
3
) lib/Doctrine/CouchDB/CouchDBException.phpnu W+A .
*/
namespace Doctrine\CouchDB;
/**
* Base exception class for package Doctrine\ODM\CouchDB
*
* @license http://www.opensource.org/licenses/lgpl-license.php LGPL
* @link www.doctrine-project.com
* @since 1.0
* @author Benjamin Eberlei
*/
class CouchDBException extends \Exception
{
public static function unknownDocumentNamespace($documentNamespaceAlias)
{
return new self("Unknown Document namespace alias '$documentNamespaceAlias'.");
}
public static function unregisteredDesignDocument($designDocumentName)
{
return new self("No design document with name '" . $designDocumentName . "' was registered with the DocumentManager.");
}
public static function invalidAttachment($className, $id, $filename)
{
return new self("Trying to save invalid attachment with filename " . $filename . " in document " . $className . " with id " . $id);
}
public static function detachedDocumentFound($className, $id, $assocName)
{
return new self("Found a detached or new document at property " .
$className . "::" . $assocName. " of document with ID " . $id . ", ".
"but the assocation is not marked as cascade persist.");
}
public static function persistRemovedDocument()
{
return new self("Trying to persist document that is scheduled for removal.");
}
public static function luceneNotConfigured()
{
return new self("CouchDB Lucene is not configured. You have to configure the handler name to enable support for Lucene Queries.");
}
}
PK CV C19 19 &