Predis\Client::connect PHP Method

connect() public method

Opens the underlying connection and connects to the server.
public connect ( )
    public function connect()
    {
        $this->connection->connect();
    }

Usage Example

Example #1
0
 /**
  * @param $sourceConfig connection URI string (tcp://10.0.0.1:6379)
  * @param $destinationConfig connection URI string (tcp://10.0.0.1:6379)
  * @throws Predis\Connection\ConnectionException
  */
 public function __construct($sourceConfig, $destinationConfig)
 {
     $this->source = new Client($sourceConfig);
     $this->destination = new Client($destinationConfig);
     $this->source->connect();
     $this->destination->connect();
 }
All Usage Examples Of Predis\Client::connect