public static function createFromPeekMessages(array $parsedResponse)
    {
        $msg            = new QueueMessage();
        $expirationDate = $parsedResponse['ExpirationTime'];
        $insertionDate  = $parsedResponse['InsertionTime'];

        $msg->setDequeueCount(intval($parsedResponse['DequeueCount']));

        $date = Utilities::rfc1123ToDateTime($expirationDate);
        $msg->setExpirationDate($date);

        $date = Utilities::rfc1123ToDateTime($insertionDate);
        $msg->setInsertionDate($date);

        $msg->setMessageId($parsedResponse['MessageId']);
        $msg->setMessageText($parsedResponse['MessageText']);

        return $msg;
    }
public static function createFromPeekMessages(array $parsedResponse)
    {
        $msg            = new QueueMessage();
        $expirationDate = $parsedResponse['ExpirationTime'];
        $insertionDate  = $parsedResponse['InsertionTime'];

        $msg->setDequeueCount(intval($parsedResponse['DequeueCount']));

        $date = Utilities::rfc1123ToDateTime($expirationDate);
        $msg->setExpirationDate($date);

        $date = Utilities::rfc1123ToDateTime($insertionDate);
        $msg->setInsertionDate($date);

        $msg->setMessageId($parsedResponse['MessageId']);
        $msg->setMessageText($parsedResponse['MessageText']);

        return $msg;
    }
public static function createFromPeekMessages ( array $ parsedResponse ) { $ msg = new QueueMessage ( ) ; $ expirationDate = $ parsedResponse [ 'ExpirationTime' ] ; $ insertionDate = $ parsedResponse [ 'InsertionTime' ] ; $ msg -> setDequeueCount ( intval ( $ parsedResponse [ 'DequeueCount' ] ) ) ; $ date = Utilities :: rfc1123ToDateTime ( $ expirationDate ) ; $ msg -> setExpirationDate ( $ date ) ; $ date = Utilities :: rfc1123ToDateTime ( $ insertionDate ) ; $ msg -> setInsertionDate ( $ date ) ; $ msg -> setMessageId ( $ parsedResponse [ 'MessageId' ] ) ; $ msg -> setMessageText ( $ parsedResponse [ 'MessageText' ] ) ; return $ msg ; }
Creates QueueMessage object from parsed XML response of
PeekMessages.

@param array $parsedResponse XML response parsed into array.

@internal

@return QueueMessage
Creates QueueMessage object from parsed XML response of PeekMessages .