lib/Segment/QueueConsumer.php
protected function enqueue($item) {
    $count = count($this->queue);

    if ($count > $this->max_queue_size) {
      return false;
    }

    $count = array_push($this->queue, $item);

    if ($count >= $this->batch_size) {
      return $this->flush(); // return ->flush() result: true on success
    }

    return true;
  }
protected function enqueue($item) {
    $count = count($this->queue);

    if ($count > $this->max_queue_size) {
      return false;
    }

    $count = array_push($this->queue, $item);

    if ($count >= $this->batch_size) {
      return $this->flush(); // return ->flush() result: true on success
    }

    return true;
  }
protected function enqueue ( $ item ) { $ count = count ( $ this -> queue ) ; if ( $ count > $ this -> max_queue_size ) { return false ; } $ count = array_push ( $ this -> queue , $ item ) ; if ( $ count >= $ this -> batch_size ) { return $ this -> flush ( ) ; // return ->flush() result: true on success } return true ; }
Adds an item to our queue.
@param  mixed   $item
@return boolean whether call has succeeded
Adds an item to our queue .