public function insert($data, $priority = 1)
        {
            $priority = (int) $priority;
            $this->items[] = array(
                'data'     => $data,
                'priority' => $priority,
            );
            $this->getQueue()->insert($data, $priority);

            return $this;
        }
public function insert($data, $priority = 1)
        {
            $priority = (int) $priority;
            $this->items[] = array(
                'data'     => $data,
                'priority' => $priority,
            );
            $this->getQueue()->insert($data, $priority);

            return $this;
        }
public function insert ( $ data , $ priority = 1 ) { $ priority = ( int ) $ priority ; $ this -> items [ ] = array ( 'data' => $ data , 'priority' => $ priority , ) ; $ this -> getQueue ( ) -> insert ( $ data , $ priority ) ; return $ this ; }
Insert an item into the queue

Priority defaults to 1 (low priority) if none provided.

@param  mixed $data
@param  int $priority
@return Queue
Insert an item into the queue