rcrowe\Hippy\Queue::remove PHP Method

remove() public method

Remove an item from the queue.
See also: rcrowe\Campfire\Message\Queue::add()
public remove ( integer $index = null ) : boolean
$index integer Index for the message in the queue you want removed. NULL empties queue.
return boolean TRUE when the item is removed from the queue
    public function remove($index = null)
    {
        if ($index !== null) {
            if (!$this->offsetExists($index)) {
                throw new \OutOfRangeException('Unknown index: ' . $index);
            }
            unset($this->container[$index]);
        } else {
            $this->container = array();
        }
    }