public static function create($parsedResponse)
    {
        $result        = new PeekMessagesResult();
        $queueMessages = array();

        if (!empty($parsedResponse)) {
            $rawMessages = Utilities::getArray(
                $parsedResponse[Resources::QP_QUEUE_MESSAGE]
            );
            foreach ($rawMessages as $value) {
                $message = QueueMessage::createFromPeekMessages($value);

                $queueMessages[] = $message;
            }
        }
        $result->setQueueMessages($queueMessages);

        return $result;
    }
public static function create($parsedResponse)
    {
        $result        = new PeekMessagesResult();
        $queueMessages = array();

        if (!empty($parsedResponse)) {
            $rawMessages = Utilities::getArray(
                $parsedResponse[Resources::QP_QUEUE_MESSAGE]
            );
            foreach ($rawMessages as $value) {
                $message = QueueMessage::createFromPeekMessages($value);

                $queueMessages[] = $message;
            }
        }
        $result->setQueueMessages($queueMessages);

        return $result;
    }
public static function create ( $ parsedResponse ) { $ result = new PeekMessagesResult ( ) ; $ queueMessages = array ( ) ; if ( ! empty ( $ parsedResponse ) ) { $ rawMessages = Utilities :: getArray ( $ parsedResponse [ Resources :: QP_QUEUE_MESSAGE ] ) ; foreach ( $ rawMessages as $ value ) { $ message = QueueMessage :: createFromPeekMessages ( $ value ) ; $ queueMessages [ ] = $ message ; } } $ result -> setQueueMessages ( $ queueMessages ) ; return $ result ; }
Creates PeekMessagesResult object from parsed XML response.

@param array $parsedResponse XML response parsed into array.

@internal

@return PeekMessagesResult
Creates PeekMessagesResult object from parsed XML response .