承接 bachi/couchdb 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

bachi/couchdb

最新稳定版本:1.1.0

Composer 安装命令:

composer require bachi/couchdb

包简介

CouchDB Client for PHP >=5.5

README 文档

README

A CouchDB Client for >=PHP 5.5 with event system.

Inspired by Doctrine/MongoDB and Doctrine/CouchDB

Service Status
Travis CI Build Status
Scrutinizer Scrutinizer Quality Score
Code Coverage Code Coverage
SensioLabsInsight SensioLabsInsight
Style CI StyleCI

Installation

Composer

You can install CouchDB Client over composer. Add the following line into your composer.json file.

$ composer require bachi/couchdb

Don't use composer?

Start to disover composer now! https://getcomposer.org

Usage

Initialize

$client = new \GuzzleHttp\Client(['base_uri' => 'http://localhost:5984', 'http_errors' => false]);
$connection = new \CouchDB\Connection($client);

Creates a database

$database = $conn->createDatabase('foobar');
// or with magic method
$database = $conn->foobar;

Get a database instance

$database = $conn->selectDatabase('foobar');
// or with magic method
$database = $conn->foobar;

Delete a database

if (true === $conn->hasDatabase('foobar')) {
    $conn->dropDatabase('foobar');
}
// or with magic methods
if (isset($conn->foobar)){
    unset($conn->foobar);
}

Unit Tests (PHPUnit)

The testsuite can you find in the tests folder.

Run the testsuite:

phpunit

It is green?

Credits

License

CouchDB Client is released under the MIT License. See the bundled LICENSE file for details.

统计信息

  • 总下载量: 272
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 12
  • 点击次数: 3
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 12
  • Watchers: 2
  • Forks: 3
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2012-02-13