GetConferenceListRequest.php 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104
  1. <?php
  2. /**
  3. * Zend Framework
  4. *
  5. * LICENSE
  6. *
  7. * This source file is subject to the new BSD license that is bundled
  8. * with this package in the file LICENSE.txt.
  9. * It is also available through the world-wide-web at this URL:
  10. * http://framework.zend.com/license/new-bsd
  11. * If you did not receive a copy of the license and are unable to
  12. * obtain it through the world-wide-web, please send an email
  13. * to license@zend.com so we can send you a copy immediately.
  14. *
  15. * @category Zend
  16. * @package Zend_Service
  17. * @subpackage DeveloperGarden
  18. * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
  19. * @license http://framework.zend.com/license/new-bsd New BSD License
  20. * @version $Id$
  21. */
  22. /**
  23. * @see Zend_Service_DeveloperGarden_Request_RequestAbstract
  24. */
  25. require_once 'Zend/Service/DeveloperGarden/Request/RequestAbstract.php';
  26. /**
  27. * @category Zend
  28. * @package Zend_Service
  29. * @subpackage DeveloperGarden
  30. * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
  31. * @author Marco Kaiser
  32. * @license http://framework.zend.com/license/new-bsd New BSD License
  33. */
  34. class Zend_Service_DeveloperGarden_Request_ConferenceCall_GetConferenceListRequest
  35. extends Zend_Service_DeveloperGarden_Request_RequestAbstract
  36. {
  37. /**
  38. * @var integer
  39. */
  40. public $what = null;
  41. /**
  42. * possible what values
  43. *
  44. * @var array
  45. */
  46. private $_whatValues = array(
  47. 0 => 'all conferences',
  48. 1 => 'just ad-hoc conferences',
  49. 2 => 'just planned conferences',
  50. 3 => 'just failed conferences',
  51. );
  52. /**
  53. * unique owner id
  54. *
  55. * @var string
  56. */
  57. public $ownerId = null;
  58. /**
  59. * constructor
  60. *
  61. * @param integer $environment
  62. * @param integer $what
  63. * @param string $ownerId
  64. */
  65. public function __construct($environment, $what = 0, $ownerId = null)
  66. {
  67. parent::__construct($environment);
  68. $this->setWhat($what)
  69. ->setOwnerId($ownerId);
  70. }
  71. /**
  72. * sets $what
  73. *
  74. * @param integer $what
  75. * @return Zend_Service_DeveloperGarden_Request_ConferenceCall_GetConferenceListRequest
  76. */
  77. public function setWhat($what)
  78. {
  79. if (!array_key_exists($what, $this->_whatValues)) {
  80. require_once 'Zend/Service/DeveloperGarden/Request/Exception.php';
  81. throw new Zend_Service_DeveloperGarden_Request_Exception('What value not allowed.');
  82. }
  83. $this->what = $what;
  84. return $this;
  85. }
  86. /**
  87. * sets $ownerId
  88. *
  89. * @param int $ownerId
  90. * @return Zend_Service_DeveloperGarden_Request_ConferenceCall_GetConferenceListRequest
  91. */
  92. public function setOwnerId($ownerId)
  93. {
  94. $this->ownerId = $ownerId;
  95. return $this;
  96. }
  97. }