ParticipantDetail.php 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195
  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_Validate_EmailAddress
  24. */
  25. require_once 'Zend/Validate/EmailAddress.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_ConferenceCall_ParticipantDetail
  35. {
  36. /**
  37. * @var string
  38. */
  39. public $firstName = null;
  40. /**
  41. * @var string
  42. */
  43. public $lastName = null;
  44. /**
  45. * @var string
  46. */
  47. public $number = null;
  48. /**
  49. * @var string
  50. */
  51. public $email = null;
  52. /**
  53. * @var integer
  54. */
  55. public $flags = null;
  56. /**
  57. * constructor for participant object
  58. *
  59. * @param string $firstName
  60. * @param string $lastName
  61. * @param string $number
  62. * @param string $email
  63. * @param integer $isInitiator
  64. */
  65. public function __construct($firstName, $lastName, $number, $email, $isInitiator = false)
  66. {
  67. $this->setFirstName($firstName)
  68. ->setLastName($lastName)
  69. ->setNumber($number)
  70. ->setEmail($email)
  71. ->setFlags((int) $isInitiator);
  72. }
  73. /**
  74. * returns the value of $firstName
  75. *
  76. * @return string
  77. */
  78. public function getFirstName()
  79. {
  80. return $this->firstName;
  81. }
  82. /**
  83. * sets $firstName
  84. *
  85. * @param string $firstName
  86. * @return Zend_Service_DeveloperGarden_ConferenceCall_ParticipantDetail
  87. */
  88. public function setFirstName($firstName)
  89. {
  90. $this->firstName = $firstName;
  91. return $this;
  92. }
  93. /**
  94. * returns the value of $lastName
  95. *
  96. * @return string
  97. */
  98. public function getLastName()
  99. {
  100. return $this->lastName;
  101. }
  102. /**
  103. * sets $lastName
  104. *
  105. * @param string $lastName
  106. * @return Zend_Service_DeveloperGarden_ConferenceCall_ParticipantDetail
  107. */
  108. public function setLastName($lastName)
  109. {
  110. $this->lastName = $lastName;
  111. return $this;
  112. }
  113. /**
  114. * returns the value of $number
  115. *
  116. * @return string
  117. */
  118. public function getNumber()
  119. {
  120. return $this->number;
  121. }
  122. /**
  123. * sets $number
  124. *
  125. * @param string $number
  126. * @return Zend_Service_DeveloperGarden_ConferenceCall_ParticipantDetail
  127. */
  128. public function setNumber($number)
  129. {
  130. $this->number = $number;
  131. return $this;
  132. }
  133. /**
  134. * returns the value of $email
  135. *
  136. * @return string
  137. */
  138. public function getEmail()
  139. {
  140. return $this->email;
  141. }
  142. /**
  143. * sets $email
  144. *
  145. * @param string email
  146. * @return Zend_Service_DeveloperGarden_ConferenceCall_ParticipantDetail
  147. */
  148. public function setEmail($email)
  149. {
  150. $validator = new Zend_Validate_EmailAddress();
  151. if (!$validator->isValid($email)) {
  152. require_once 'Zend/Service/DeveloperGarden/Exception.php';
  153. throw new Zend_Service_DeveloperGarden_Exception('Not a valid e-mail address.');
  154. }
  155. $this->email = $email;
  156. return $this;
  157. }
  158. /**
  159. * returns the value of $flags
  160. *
  161. * @return integer
  162. */
  163. public function getFlags()
  164. {
  165. return $this->flags;
  166. }
  167. /**
  168. * sets $flags (ie, initiator flag)
  169. *
  170. * @param integer $flags
  171. * @return Zend_Service_DeveloperGarden_ConferenceCall_ParticipantDetail
  172. */
  173. public function setFlags($flags)
  174. {
  175. $this->flags = $flags;
  176. return $this;
  177. }
  178. }