ConferenceSchedule.php 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262
  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. * @category Zend
  24. * @package Zend_Service
  25. * @subpackage DeveloperGarden
  26. * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
  27. * @author Marco Kaiser
  28. * @license http://framework.zend.com/license/new-bsd New BSD License
  29. */
  30. class Zend_Service_DeveloperGarden_ConferenceCall_ConferenceSchedule
  31. {
  32. /**
  33. * @var integer
  34. */
  35. public $minute = null;
  36. /**
  37. * @var integer
  38. */
  39. public $hour = null;
  40. /**
  41. * @var integer
  42. */
  43. public $dayOfMonth = null;
  44. /**
  45. * @var integer
  46. */
  47. public $month = null;
  48. /**
  49. * @var integer
  50. */
  51. public $year = null;
  52. /**
  53. * @var integer
  54. */
  55. public $recurring = 0;
  56. /**
  57. * @var integer
  58. */
  59. public $notify = 0;
  60. /**
  61. * possible recurring values
  62. *
  63. * @var array
  64. */
  65. private $_recurringValues = array(
  66. 0 => 'no recurring',
  67. 1 => 'hourly',
  68. 2 => 'daily',
  69. 3 => 'weekly',
  70. 4 => 'monthly',
  71. );
  72. /**
  73. * constructor for schedule object, all times are in UTC
  74. *
  75. * @param integer $minute
  76. * @param integer $hour
  77. * @param integer $dayOfMonth
  78. * @param integer $month
  79. * @param integer $year
  80. * @param integer $recurring
  81. * @param integer $notify
  82. */
  83. public function __construct($minute, $hour, $dayOfMonth, $month, $year, $recurring = 0, $notify = 0)
  84. {
  85. $this->setMinute($minute)
  86. ->setHour($hour)
  87. ->setDayOfMonth($dayOfMonth)
  88. ->setMonth($month)
  89. ->setYear($year)
  90. ->setRecurring($recurring)
  91. ->setNotify($notify);
  92. }
  93. /**
  94. * returns the value of $minute
  95. *
  96. * @return integer
  97. */
  98. public function getMinute()
  99. {
  100. return $this->minute;
  101. }
  102. /**
  103. * sets $minute
  104. *
  105. * @param integer $minute
  106. * @return Zend_Service_DeveloperGarden_ConferenceCall_ConferenceSchedule
  107. */
  108. public function setMinute($minute)
  109. {
  110. $this->minute = $minute;
  111. return $this;
  112. }
  113. /**
  114. * returns the value of $hour
  115. *
  116. * @return integer
  117. */
  118. public function getHour()
  119. {
  120. return $this->hour;
  121. }
  122. /**
  123. * sets $hour
  124. *
  125. * @param integer $hour
  126. * @return Zend_Service_DeveloperGarden_ConferenceCall_ConferenceSchedule
  127. */
  128. public function setHour($hour)
  129. {
  130. $this->hour = $hour;
  131. return $this;
  132. }
  133. /**
  134. * returns the value of $dayOfMonth
  135. *
  136. * @return integer
  137. */
  138. public function getDayOfMonth()
  139. {
  140. return $this->dayOfMonth;
  141. }
  142. /**
  143. * sets $dayOfMonth
  144. *
  145. * @param integer $dayOfMonth
  146. * @return Zend_Service_DeveloperGarden_ConferenceCall_ConferenceSchedule
  147. */
  148. public function setDayOfMonth($dayOfMonth)
  149. {
  150. $this->dayOfMonth = $dayOfMonth;
  151. return $this;
  152. }
  153. /**
  154. * returns the value of $month
  155. *
  156. * @return integer
  157. */
  158. public function getMonth()
  159. {
  160. return $this->month;
  161. }
  162. /**
  163. * sets $month
  164. *
  165. * @param integer $month
  166. * @return Zend_Service_DeveloperGarden_ConferenceCall_ConferenceSchedule
  167. */
  168. public function setMonth($month)
  169. {
  170. $this->month = $month;
  171. return $this;
  172. }
  173. /**
  174. * returns the value of $year
  175. *
  176. * @return integer
  177. */
  178. public function getYear()
  179. {
  180. return $this->year;
  181. }
  182. /**
  183. * sets $year
  184. *
  185. * @param integer $year
  186. * @return Zend_Service_DeveloperGarden_ConferenceCall_ConferenceSchedule
  187. */
  188. public function setYear($year)
  189. {
  190. $this->year = $year;
  191. return $this;
  192. }
  193. /**
  194. * returns the value of $recurring
  195. *
  196. * @return integer
  197. */
  198. public function getRecurring()
  199. {
  200. return $this->recurring;
  201. }
  202. /**
  203. * sets $recurring
  204. *
  205. * @param integer $recurring
  206. * @return Zend_Service_DeveloperGarden_ConferenceCall_ConferenceSchedule
  207. */
  208. public function setRecurring($recurring)
  209. {
  210. if (!array_key_exists($recurring, $this->_recurringValues)) {
  211. require_once 'Zend/Service/DeveloperGarden/ConferenceCall/Exception.php';
  212. throw new Zend_Service_DeveloperGarden_ConferenceCall_Exception(
  213. 'Unknown ConferenceCall recurring mode.'
  214. );
  215. }
  216. $this->recurring = $recurring;
  217. return $this;
  218. }
  219. /**
  220. * returns the value of $notify
  221. *
  222. * @return integer
  223. */
  224. public function getNotify()
  225. {
  226. return $this->notify;
  227. }
  228. /**
  229. * sets $notify
  230. *
  231. * @param integer $notify
  232. * @return Zend_Service_DeveloperGarden_ConferenceCall_ConferenceSchedule
  233. */
  234. public function setNotify($notify)
  235. {
  236. $this->notify = $notify;
  237. return $this;
  238. }
  239. }