public function enqueue($payload, $priority = 0)
    {
        $this->collection
            ->createDocument(array(
                'payload'   => $payload,
                'priority'  => (int) $priority,
                'datetime'  => new \MongoDate,
            ))
            ->save();
        
        return $this;
    }
public function enqueue($payload, $priority = 0)
    {
        $this->collection
            ->createDocument(array(
                'payload'   => $payload,
                'priority'  => (int) $priority,
                'datetime'  => new \MongoDate,
            ))
            ->save();
        
        return $this;
    }
public function enqueue ( $ payload , $ priority = 0 ) { $ this -> collection -> createDocument ( array ( 'payload' => $ payload , 'priority' => ( int ) $ priority , 'datetime' => new \ MongoDate , ) ) -> save ( ) ; return $ this ; }
Add item to queue

@param mixed $payload data to send
@param int $priority more priority num give quicker getting from queue
@return \Sokil\Mongo\Queue
Add item to queue