[phpdoc] Apply a few fixes to the documentation.

This commit is contained in:
Daniele Alessandri
2011-10-22 11:41:58 +02:00
parent 2f23fb03f0
commit 29f26b0f9b
14 changed files with 60 additions and 62 deletions
+18 -16
View File
@@ -36,7 +36,7 @@ class Client
/**
* Initializes a new client with optional connection parameters and client options.
*
* @param mixed $parameters Connection parameters for one or multiple Redis servers.
* @param mixed $parameters Connection parameters for one or multiple servers.
* @param mixed $options Options that specify certain behaviours for the client.
*/
public function __construct($parameters = null, $options = null)
@@ -56,8 +56,8 @@ class Client
/**
* Creates an instance of Predis\Options\ClientOptions from various types of
* parameters (string, array, Predis\Profiles\ServerProfile) or returns the
* passed object if its an instance of Predis\Options\ClientOptions.
* arguments (string, array, Predis\Profiles\ServerProfile) or returns the
* passed object if it is an instance of Predis\Options\ClientOptions.
*
* @param mixed $options Client options.
* @return ClientOptions
@@ -84,11 +84,11 @@ class Client
}
/**
* Initialize one or multiple connection (cluster) objects from various types of
* parameters (string, array) or returns the passed object if it implements the
* Predis\Network\IConnection interface.
* Initializes one or multiple connection (cluster) objects from various
* types of arguments (string, array) or returns the passed object if it
* implements the Predis\Network\IConnection interface.
*
* @param mixed $parameters Connection parameters or object.
* @param mixed $parameters Connection parameters or instance.
* @return IConnection
*/
private function initializeConnection($parameters)
@@ -117,7 +117,7 @@ class Client
}
/**
* Create a new connection to a single Redis server using the provided parameters.
* Creates a new connection to a single server with the provided parameters.
*
* @param mixed $parameters Connection parameters.
* @return IConnectionSingle
@@ -151,7 +151,7 @@ class Client
}
/**
* Returns the client options specified upon client initialization.
* Returns the client options specified upon initialization.
*
* @return ClientOptions
*/
@@ -171,9 +171,9 @@ class Client
}
/**
* Returns a new client instance for the specified connection when the client
* is connected to a cluster. The new client will use the same options of the
* the original instance.
* Returns a new instance of a client for the specified connection when the
* client is connected to a cluster. The new instance will use the same
* options of the original client.
*
* @return Client
*/
@@ -187,7 +187,7 @@ class Client
}
/**
* Opens the connection to Redis.
* Opens the connection to the server.
*/
public function connect()
{
@@ -195,7 +195,7 @@ class Client
}
/**
* Disconnects from Redis.
* Disconnects from the server.
*/
public function disconnect()
{
@@ -203,7 +203,9 @@ class Client
}
/**
* Disconnects from Redis. This method is an alias of disconnect().
* Disconnects from the server.
*
* This method is an alias of disconnect().
*/
public function quit()
{
@@ -301,7 +303,7 @@ class Client
}
/**
* Call the specified initializer method on $this with 0, 1 or 2 arguments.
* Calls the specified initializer method on $this with 0, 1 or 2 arguments.
*
* TODO: Invert $argv and $initializer.
*
+1 -1
View File
@@ -64,7 +64,7 @@ abstract class Command implements ICommand
}
/**
* Get the argument from the arguments list at the specified index.
* Gets the argument from the arguments list at the specified index.
*
* @param array $arguments Position of the argument.
*/
+2 -2
View File
@@ -36,14 +36,14 @@ interface ICommand
public function getHash(INodeKeyGenerator $distributor);
/**
* Set the arguments of the command.
* Sets the arguments of the command.
*
* @param array $arguments List of arguments.
*/
public function setArguments(Array $arguments);
/**
* Get the arguments of the command.
* Gets the arguments of the command.
*
* @return array
*/
@@ -34,7 +34,7 @@ interface ICommandProcessorChain extends ICommandProcessor, \IteratorAggregate,
public function remove(ICommandProcessor $processor);
/**
* Gets the ordered list of command processors in the chain.
* Returns an ordered list of the command processors in the chain.
*
* @return array
*/
@@ -42,7 +42,7 @@ class KeyPrefixProcessor implements ICommandProcessor
}
/**
* Get the current prefix.
* Gets the current prefix.
*
* @return string
*/
+1 -1
View File
@@ -51,7 +51,7 @@ class ZSetRange extends Command
}
/**
* Return a list of options and modifiers compatible with Redis.
* Returns a list of options and modifiers compatible with Redis.
*
* @param array $options List of options.
* @return array
+1 -1
View File
@@ -48,7 +48,7 @@ class ZSetUnionStore extends Command
}
/**
* Return a list of options and modifiers compatible with Redis.
* Returns a list of options and modifiers compatible with Redis.
*
* @param array $options List of options.
* @return array
@@ -12,7 +12,7 @@
namespace Predis\Iterators;
/**
* Abstract the access to a streamable list of tuples represented
* Abstracts the access to a streamable list of tuples represented
* as a multibulk reply that alternates keys and values.
*
* @author Daniele Alessandri <suppakilla@gmail.com>
+1 -1
View File
@@ -12,7 +12,7 @@
namespace Predis;
/**
* Client-side abstraction of a Redis monitor context.
* Client-side abstraction of a Redis MONITOR context.
*
* @author Daniele Alessandri <suppakilla@gmail.com>
*/
+1 -1
View File
@@ -43,7 +43,7 @@ abstract class ConnectionBase implements IConnectionSingle
}
/**
* Disconnect from the server and destroys the underlying resource when
* Disconnects from the server and destroys the underlying resource when
* PHP's garbage collector kicks in.
*/
public function __destruct()
+16 -19
View File
@@ -11,21 +11,6 @@
namespace Predis\Network;
// This class provides the implementation of a Predis connection that internally
// uses the PHP socket extension for network communication and wraps the phpiredis
// C extension (PHP bindings for hiredis) to parse the Redis protocol. Everything
// is *highly experimental* (even the very same phpiredis since it is quite new),
// so use it at your own risk.
// This class is mainly intended to provide an optional low-overhead alternative
// for processing replies from Redis compared to the standard pure-PHP classes.
// Differences in speed when dealing with short inline replies are practically
// nonexistent, the actual speed boost is for long multibulk replies when this
// protocol processor can parse and return replies very fast.
// For instructions on how to build and install the phpiredis extension, please
// consult the repository of the project at http://github.com/seppo0010/phpiredis
use Predis\ResponseError;
use Predis\ResponseQueued;
use Predis\ClientException;
@@ -34,10 +19,22 @@ use Predis\IConnectionParameters;
use Predis\Commands\ICommand;
/**
* Connection abstraction to Redis servers based on PHP's sockets to
* handle the actual network connection and the phpiredis extension to
* handle the parsing of Redis protocol.
* This class provides the implementation of a Predis connection that uses the
* PHP socket extension for network communication and wraps the phpiredis C
* extension (PHP bindings for hiredis) to parse the Redis protocol. Everything
* is highly experimental (even the very same phpiredis since it is quite new),
* so use it at your own risk.
*
* This class is mainly intended to provide an optional low-overhead alternative
* for processing replies from Redis compared to the standard pure-PHP classes.
* Differences in speed when dealing with short inline replies are practically
* nonexistent, the actual speed boost is for long multibulk replies when this
* protocol processor can parse and return replies very fast.
*
* For instructions on how to build and install the phpiredis extension, please
* consult the repository of the project.
*
* @link http://github.com/seppo0010/phpiredis
* @author Daniele Alessandri <suppakilla@gmail.com>
*/
class PhpiredisConnection extends ConnectionBase
@@ -60,7 +57,7 @@ class PhpiredisConnection extends ConnectionBase
}
/**
* Disconnect from the server and destroys the underlying resource and the
* Disconnects from the server and destroys the underlying resource and the
* protocol reader resource when PHP's garbage collector kicks in.
*/
public function __destruct()
+3 -3
View File
@@ -29,7 +29,7 @@ class StreamConnection extends ConnectionBase
private $_throwErrors;
/**
* Disconnect from the server and destroys the underlying resource when
* Disconnects from the server and destroys the underlying resource when
* PHP's garbage collector kicks in only if the connection has not been
* marked as persistent.
*/
@@ -161,8 +161,8 @@ class StreamConnection extends ConnectionBase
}
/**
* Perform a write operation on the stream of the buffer containing a command
* serialized with the Redis wire protocol.
* Performs a write operation on the stream of the buffer containing a
* command serialized with the Redis wire protocol.
*
* @param string $buffer Redis wire protocol representation of a command.
*/
+12 -13
View File
@@ -11,17 +11,6 @@
namespace Predis\Network;
// This class implements a Predis connection that actually talks with Webdis
// (http://github.com/nicolasff/webdis) instead of connecting directly to Redis.
// It relies on the cURL extension to communicate with the web server and the
// phpiredis extension to parse the protocol of the replies returned in the http
// response bodies.
//
// Some features are not yet available or they simply cannot be implemented:
// - Pipelining commands.
// - Publish / Subscribe.
// - MULTI / EXEC transactions (not yet supported by Webdis).
use Predis\IConnectionParameters;
use Predis\ResponseError;
use Predis\ClientException;
@@ -32,9 +21,19 @@ use Predis\Protocol\ProtocolException;
const ERR_MSG_EXTENSION = 'The %s extension must be loaded in order to be able to use this connection class';
/**
* Connection abstraction to Webdis servers.
* This class implements a Predis connection that actually talks with Webdis
* instead of connecting directly to Redis. It relies on the cURL extension to
* communicate with the web server and the phpiredis extension to parse the
* protocol of the replies returned in the http response bodies.
*
* @link http://webd.is/
* Some features are not yet available or they simply cannot be implemented:
* - Pipelining commands.
* - Publish / Subscribe.
* - MULTI / EXEC transactions (not yet supported by Webdis).
*
* @link http://webd.is
* @link http://github.com/nicolasff/webdis
* @link http://github.com/seppo0010/phpiredis
* @author Daniele Alessandri <suppakilla@gmail.com>
*/
class WebdisConnection implements IConnectionSingle
+1 -1
View File
@@ -160,7 +160,7 @@ class PubSubContext implements \Iterator
}
/**
* Write a Redis command on the underlying connection.
* Writes a Redis command on the underlying connection.
*
* @param string $method ID of the command.
* @param array $arguments List of arguments.