Skip to content
This repository was archived by the owner on Apr 20, 2022. It is now read-only.

Commit 12d0c0b

Browse files
brett19trondn
authored andcommitted
Added descriptions to the various classes which were lacking one.
Change-Id: I88c1e1e93709917352beac88a065d84bfe574c2c Reviewed-on: http://review.couchbase.org/29265 Tested-by: Brett Lawson <brett19@gmail.com> Reviewed-by: Trond Norbye <trond.norbye@gmail.com>
1 parent 67776df commit 12d0c0b

File tree

1 file changed

+48
-0
lines changed

1 file changed

+48
-0
lines changed

example/couchbase-api.php

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -178,9 +178,13 @@
178178
*/
179179
const COUCHBASE_REPLICA_SELECT = LCB_REPLICA_SELECT;
180180

181+
/**
182+
* A class representing a connection to a Couchbase bucket.
183+
*/
181184
class Couchbase {
182185

183186
/**
187+
* Constructs a new instance of a Couchbase object.
184188
*
185189
* @param array $hosts An array of hostnames[:port] where the
186190
* Couchbase cluster is running. The port number is
@@ -974,6 +978,12 @@ function listDesignDocs() {
974978

975979
}
976980

981+
/**
982+
* A class to wrap the management of a Couchbase cluster.
983+
*
984+
* Provides APIs for managing a Couchbase cluster, including the creation,
985+
* deletion and modification of buckets.
986+
*/
977987
class CouchbaseClusterManager {
978988

979989
/**
@@ -1099,46 +1109,84 @@ function flushBucket($name) {
10991109
// //
11001110
////////////////////////////////////////////////////////
11011111

1112+
/**
1113+
* The base Couchbase Exception class which all Couchbase Exceptions
1114+
* inherit from.
1115+
*/
11021116
class CouchbaseException extends Exception {
11031117

11041118
}
11051119

1120+
/**
1121+
* Exception thrown when an invalid key is passed
1122+
*/
11061123
class CouchbaseIllegalKeyException extends CouchbaseException {
11071124

11081125
}
11091126

1127+
/**
1128+
* Exception thrown when the server determines the requested key does not
1129+
* exist.
1130+
*/
11101131
class CouchbaseNoSuchKeyException extends CouchbaseException {
11111132

11121133
}
11131134

1135+
/**
1136+
* Exception thrown when authentication with the server fails.
1137+
*/
11141138
class CouchbaseAuthenticationException extends CouchbaseException {
11151139

11161140
}
11171141

1142+
/**
1143+
* Exception thrown on internal libcouchbase errors.
1144+
*/
11181145
class CouchbaseLibcouchbaseException extends CouchbaseException {
11191146

11201147
}
11211148

1149+
/**
1150+
* Exception thrown when the server encounters an error.
1151+
*/
11221152
class CouchbaseServerException extends CouchbaseException {
11231153

11241154
}
11251155

1156+
/**
1157+
* Exception thrown when the CAS value you passed does not match the servers
1158+
* current value.
1159+
*/
11261160
class CouchbaseKeyMutatedException extends CouchbaseException {
11271161

11281162
}
11291163

1164+
/**
1165+
* Exception thrown when an operation times out.
1166+
*/
11301167
class CouchbaseTimeoutException extends CouchbaseException {
11311168

11321169
}
11331170

1171+
/**
1172+
* Exception thrown when there are not enough nodes online to preform a
1173+
* particular operation. Generally occurs due to invalid durability
1174+
* requirements
1175+
*/
11341176
class CouchbaseNotEnoughNodesException extends CouchbaseException {
11351177

11361178
}
11371179

1180+
/**
1181+
* Exception thrown when an illegal option is passed to a method.
1182+
*/
11381183
class CouchbaseIllegalOptionException extends CouchbaseException {
11391184

11401185
}
11411186

1187+
/**
1188+
* Exception thrown when an illegal value is passed to a method.
1189+
*/
11421190
class CouchbaseIllegalValueException extends CouchbaseException {
11431191

11441192
}

0 commit comments

Comments
 (0)