Ver Fonte

Add initial chapter files

And some initial work on the client constructor documentation
Dominic Scheirlinck há 12 anos atrás
pai
commit
e59efbafc4
4 ficheiros alterados com 60 adições e 0 exclusões
  1. 46 0
      doc/client.rst
  2. 7 0
      doc/index.rst
  3. 5 0
      doc/pipelining.rst
  4. 2 0
      doc/replication.rst

+ 46 - 0
doc/client.rst

@@ -0,0 +1,46 @@
+The `Predis\\Client` class
+--------------------------
+
+.. php:namespace:: Predis
+
+The `Client` class is the main class users interact with in Predis. The first
+thing you'll do to start communicating with Redis is instantiate a `Client`.
+
+Constructing a Client
+=====================
+
+The `Client` constructor takes two arguments. The first (``$parameters``) is a
+set of information about the Redis connection you'd like to make. The second
+(``$options``) is a set of options to configure the client.
+
+.. php:class:: Client
+
+   .. php:method:: __construct($parameters = null, $options = null)
+
+      Creates a new `Client` instance.
+
+      :param $parameters: Connection parameters
+      :param $options:    Client options
+
+
+Connection Parameters
+'''''''''''''''''''''
+
+These parameters are used to control the behaviour of the underlying connection
+to Redis. They can be specified using a URI string::
+
+   $client = new Predis\Client('tcp://127.0.0.1:6379?database=2')
+
+Or, using an associative array::
+
+   $client = new Predis\Client(array(
+       'scheme'   => 'tcp',
+       'host'     => '127.0.0.1',
+       'port'     => 6379,
+       'database' => 3
+   ));
+
+Client Options
+''''''''''''''
+
+

+ 7 - 0
doc/index.rst

@@ -1,12 +1,19 @@
 Predis
 ======
 
+Release:
+  |release|
+
 Welcome to the end-user Predis documentation.
 
 .. toctree::
    :maxdepth: 2
 
+   client
+   pipelining
    clustering
+   replication
+   glossary
    license
 
 Indices and tables

+ 5 - 0
doc/pipelining.rst

@@ -0,0 +1,5 @@
+Pipelining
+----------
+
+Why Pipeline?
+=============

+ 2 - 0
doc/replication.rst

@@ -0,0 +1,2 @@
+Replication
+-----------