PHP Class Predis\CommunicationException

Author: Daniele Alessandri ([email protected])
Inheritance: extends PredisException
Afficher le fichier Open project: nrk/predis Class Usage Examples

Méthodes publiques

Méthode Description
__construct ( Predis\Connection\NodeConnectionInterface $connection, string $message = null, integer $code = null, Exception $innerException = null )
getConnection ( ) : Predis\Connection\NodeConnectionInterface Gets the connection that generated the exception.
handle ( CommunicationException $exception ) Helper method to handle exceptions generated by a connection object.
shouldResetConnection ( ) : boolean Indicates if the receiver should reset the underlying connection.

Method Details

__construct() public méthode

public __construct ( Predis\Connection\NodeConnectionInterface $connection, string $message = null, integer $code = null, Exception $innerException = null )
$connection Predis\Connection\NodeConnectionInterface Connection that generated the exception.
$message string Error message.
$code integer Error code.
$innerException Exception Inner exception for wrapping the original error.

getConnection() public méthode

Gets the connection that generated the exception.
public getConnection ( ) : Predis\Connection\NodeConnectionInterface
Résultat Predis\Connection\NodeConnectionInterface

handle() public static méthode

Helper method to handle exceptions generated by a connection object.
public static handle ( CommunicationException $exception )
$exception CommunicationException Exception.

shouldResetConnection() public méthode

Indicates if the receiver should reset the underlying connection.
public shouldResetConnection ( ) : boolean
Résultat boolean