Jenner\SimpleFork\Queue\RedisQueue::close PHP Method

close() public method

close the connection
public close ( )
    public function close()
    {
        $this->redis->close();
    }

Usage Example

 public function testAll()
 {
     if (!extension_loaded("Redis")) {
         $this->markTestSkipped("Redis extension is not loaded");
     }
     $this->queue = new \Jenner\SimpleFork\Queue\RedisQueue();
     $this->assertTrue($this->queue->put('test'));
     $this->assertEquals($this->queue->get(), 'test');
     $this->assertEquals($this->queue->size(), 0);
     $this->queue->close();
 }