瀏覽代碼

Add notes about the parameters supported by each connection class.

Daniele Alessandri 13 年之前
父節點
當前提交
64a84d9020

+ 9 - 0
lib/Predis/Connection/PhpiredisConnection.php

@@ -35,6 +35,15 @@ use Predis\NotSupportedException;
  * For instructions on how to build and install the phpiredis extension, please
  * consult the repository of the project.
  *
+ * The connection parameters supported by this class are:
+ *
+ *  - scheme: it can be either 'tcp' or 'unix'.
+ *  - host: hostname or IP address of the server.
+ *  - port: TCP port of the server.
+ *  - timeout: timeout to perform the connection.
+ *  - read_write_timeout: timeout of read / write operations.
+ *  - throw_errors: -ERR replies treated as exceptions.
+ *
  * @link http://github.com/seppo0010/phpiredis
  * @author Daniele Alessandri <suppakilla@gmail.com>
  */

+ 12 - 1
lib/Predis/Connection/StreamConnection.php

@@ -20,7 +20,18 @@ use Predis\Command\CommandInterface;
 use Predis\Iterator\MultiBulkResponseSimple;
 
 /**
- * Connection abstraction to Redis servers based on PHP's streams.
+ * Standard connection to Redis servers implemented on top of PHP's streams.
+ * The connection parameters supported by this class are:
+ *
+ *  - scheme: it can be either 'tcp' or 'unix'.
+ *  - host: hostname or IP address of the server.
+ *  - port: TCP port of the server.
+ *  - timeout: timeout to perform the connection.
+ *  - read_write_timeout: timeout of read / write operations.
+ *  - async_connect: performs the connection asynchronously.
+ *  - persistent: the connection is left intact after a GC collection.
+ *  - throw_errors: -ERR replies treated as exceptions.
+ *  - iterable_multibulk: multibulk replies treated as iterable objects.
  *
  * @author Daniele Alessandri <suppakilla@gmail.com>
  */

+ 10 - 0
lib/Predis/Connection/WebdisConnection.php

@@ -33,6 +33,16 @@ const ERR_MSG_EXTENSION = 'The %s extension must be loaded in order to be able t
  *   - Publish / Subscribe.
  *   - MULTI / EXEC transactions (not yet supported by Webdis).
  *
+ * The connection parameters supported by this class are:
+ *
+ *  - scheme: must be 'http'.
+ *  - host: hostname or IP address of the server.
+ *  - port: TCP port of the server.
+ *  - timeout: timeout to perform the connection.
+ *  - user: username for authentication.
+ *  - pass: password for authentication.
+ *  - throw_errors: -ERR replies treated as exceptions.
+ *
  * @link http://webd.is
  * @link http://github.com/nicolasff/webdis
  * @link http://github.com/seppo0010/phpiredis