Message.php 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. <?php
  2. /**
  3. * LICENSE
  4. *
  5. * This source file is subject to the new BSD license that is bundled
  6. * with this package in the file LICENSE.txt.
  7. * It is also available through the world-wide-web at this URL:
  8. * http://framework.zend.com/license/new-bsd
  9. * If you did not receive a copy of the license and are unable to
  10. * obtain it through the world-wide-web, please send an email
  11. * to license@zend.com so we can send you a copy immediately.
  12. *
  13. * @category Zend
  14. * @package Zend_Cloud
  15. * @subpackage QueueService
  16. * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
  17. * @license http://framework.zend.com/license/new-bsd New BSD License
  18. */
  19. /**
  20. * Generic message class
  21. *
  22. * @category Zend
  23. * @package Zend_Cloud
  24. * @subpackage QueueService
  25. * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
  26. * @license http://framework.zend.com/license/new-bsd New BSD License
  27. */
  28. class Zend_Cloud_QueueService_Message
  29. {
  30. protected $_body;
  31. protected $_clientMessage;
  32. /**
  33. * @param string $body Message text
  34. * @param string $message Original message
  35. */
  36. function __construct($body, $message)
  37. {
  38. $this->_body = $body;
  39. $this->_clientMessage = $message;
  40. }
  41. /**
  42. * Get the message body
  43. * @return string
  44. */
  45. public function getBody()
  46. {
  47. return $this->_body;
  48. }
  49. /**
  50. * Get the original adapter-specific message
  51. */
  52. public function getMessage()
  53. {
  54. return $this->_clientMessage;
  55. }
  56. }