Couchbase Client Library PHP 1.1
Couchbase Client Library: PHP 1.1
Couchbase Client Library: PHP 1.1
Abstract
This is the manual for 1.1 of the Couchbase PHP client library, which is compatible with Couchbase Server 2.0. This is a Beta release.
This manual provides a reference to the key features and best practive for using the PHP Couchbase Client Library (PECL mem-
cached). The content constitutes a reference to the core API, not a complete guide to the entire API functionality.
Table 1. Product Compatibility for Couchbase SDK PHP
Product Compatible All Features
Couchbase Server 1.8 ? ?
Couchbase Server 2.0 ? ?
External Community Resources.
Wiki: PHP Client Library
PHP Client Library
Couchbase Developer Guide 2.0
Couchbase Server Manual 2.0
SDK Forum
Note. The following document is still in production, and is not considered complete or exhaustive.
Last document update: 20 Dec 2012 17:17; Document built: 20 Dec 2012 17:17.
Documentation Availability and Formats. This documentation is available online: HTML Online . For other documentation from
Couchbase, see Couchbase Documentation Library
Contact: editors@couchbase.com or couchbase.com
Copyright ? 2010, 2011 Couchbase, Inc. Contact copyright@couchbase.com.
For documentation license information, see Section B.1, 鈥淒ocumentation License鈥. For all license information, see Appendix B, Licenses.
iii
Table of Contents
1. Getting Started ....................................................................................................................................... 1
1.1. Downloading and Installation ......................................................................................................... 1
1.1.1. Verifying the PHP SDK ...................................................................................................... 2
1.2. Accessing Couchbase from PHP ..................................................................................................... 3
1.3. Conclusion .................................................................................................................................. 5
2. Tutorial ................................................................................................................................................. 6
2.1. Preparations ................................................................................................................................. 6
2.1.1. Setting up Couchbase Server ................................................................................................ 6
2.1.2. Installing the Application Dependencies ................................................................................. 7
2.2. Bootstrapping the Application ......................................................................................................... 8
2.3. Managing Beers ......................................................................................................................... 10
2.4. Wrapping Up ............................................................................................................................. 15
3. PHP Method Summary .......................................................................................................................... 16
3.1. Error Codes and Constants ........................................................................................................... 17
4. Connection Operations ........................................................................................................................... 19
4.1. Getting a List of Nodes in the Cluster ............................................................................................ 20
4.2. Setting Client Library Options ...................................................................................................... 20
4.3. Getting Version Information ......................................................................................................... 21
4.4. Obtain the Number of Replicas .................................................