public function postMessages($queue_name, $messages, $properties = array())
    {
        $req = array(
            "messages" => array(),
        );
        foreach ($messages as $message) {
            $msg = new IronMQMessage($message, $properties);
            array_push($req['messages'], $msg->asArray());
        }
        $this->setJsonHeaders();
        $queue = rawurlencode($queue_name);
        $url = "projects/{$this->project_id}/queues/$queue/messages";
        $res = $this->apiCall(self::POST, $url, $req);
        return self::json_decode($res);
    }
public function postMessages($queue_name, $messages, $properties = array())
    {
        $req = array(
            "messages" => array(),
        );
        foreach ($messages as $message) {
            $msg = new IronMQMessage($message, $properties);
            array_push($req['messages'], $msg->asArray());
        }
        $this->setJsonHeaders();
        $queue = rawurlencode($queue_name);
        $url = "projects/{$this->project_id}/queues/$queue/messages";
        $res = $this->apiCall(self::POST, $url, $req);
        return self::json_decode($res);
    }
public function postMessages ( $ queue_name , $ messages , $ properties = array ( ) ) { $ req = array ( "messages" => array ( ) , ) ; foreach ( $ messages as $ message ) { $ msg = new IronMQMessage ( $ message , $ properties ) ; array_push ( $ req [ 'messages' ] , $ msg -> asArray ( ) ) ; } $ this -> setJsonHeaders ( ) ; $ queue = rawurlencode ( $ queue_name ) ; $ url = "projects/{$this->project_id}/queues/$queue/messages" ; $ res = $ this -> apiCall ( self :: POST , $ url , $ req ) ; return self :: json_decode ( $ res ) ; }
Push multiple messages on the queue

Example:
<code>
$ironmq->postMessages("test_queue", array("Lorem", "Ipsum"), array(
'timeout' => 120,
'delay' => 2,
'expires_in' => 2*24*3600 # 2 days
));
</code>

@param string $queue_name Name of the queue.
@param array $messages array of messages, each message same as for postMessage() method
@param array $properties array of message properties, applied to each message in $messages
@return mixed
Push multiple messages on the queue