web/lib/Zend/Service/DeveloperGarden/ConferenceCall/ParticipantDetail.php
changeset 64 162c1de6545a
parent 19 1c2f13fd785c
child 68 ecaf28ffe26e
equal deleted inserted replaced
63:5b37998e522e 64:162c1de6545a
       
     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-2010 Zend Technologies USA Inc. (http://www.zend.com)
       
    19  * @license    http://framework.zend.com/license/new-bsd     New BSD License
       
    20  * @version    $Id: ParticipantDetail.php 20166 2010-01-09 19:00:17Z bkarwin $
       
    21  */
       
    22 /**
       
    23  * @see Zend_Validate_EmailAddress
       
    24  */
       
    25 require_once 'Zend/Validate/EmailAddress.php';
       
    26 
       
    27 /**
       
    28  * @category   Zend
       
    29  * @package    Zend_Service
       
    30  * @subpackage DeveloperGarden
       
    31  * @copyright  Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
       
    32  * @author     Marco Kaiser
       
    33  * @license    http://framework.zend.com/license/new-bsd     New BSD License
       
    34  */
       
    35 class Zend_Service_DeveloperGarden_ConferenceCall_ParticipantDetail
       
    36 {
       
    37     /**
       
    38      * @var string
       
    39      */
       
    40     public $firstName = null;
       
    41 
       
    42     /**
       
    43      * @var string
       
    44      */
       
    45     public $lastName = null;
       
    46 
       
    47     /**
       
    48      * @var string
       
    49      */
       
    50     public $number = null;
       
    51 
       
    52     /**
       
    53      * @var string
       
    54      */
       
    55     public $email = null;
       
    56 
       
    57     /**
       
    58      * @var integer
       
    59      */
       
    60     public $flags = null;
       
    61 
       
    62     /**
       
    63      * constructor for participant object
       
    64      *
       
    65      * @param string $firstName
       
    66      * @param string $lastName
       
    67      * @param string $number
       
    68      * @param string $email
       
    69      * @param integer $isInitiator
       
    70      */
       
    71     public function __construct($firstName, $lastName, $number, $email, $isInitiator = false)
       
    72     {
       
    73         $this->setFirstName($firstName)
       
    74              ->setLastName($lastName)
       
    75              ->setNumber($number)
       
    76              ->setEmail($email)
       
    77              ->setFlags((int) $isInitiator);
       
    78     }
       
    79 
       
    80     /**
       
    81      * returns the value of $firstName
       
    82      *
       
    83      * @return string
       
    84      */
       
    85     public function getFirstName()
       
    86     {
       
    87         return $this->firstName;
       
    88     }
       
    89 
       
    90     /**
       
    91      * sets $firstName
       
    92      *
       
    93      * @param string $firstName
       
    94      * @return Zend_Service_DeveloperGarden_ConferenceCall_ParticipantDetail
       
    95      */
       
    96     public function setFirstName($firstName)
       
    97     {
       
    98         $this->firstName = $firstName;
       
    99         return $this;
       
   100     }
       
   101 
       
   102     /**
       
   103      * returns the value of $lastName
       
   104      *
       
   105      * @return string
       
   106      */
       
   107     public function getLastName()
       
   108     {
       
   109         return $this->lastName;
       
   110     }
       
   111 
       
   112     /**
       
   113      * sets $lastName
       
   114      *
       
   115      * @param string $lastName
       
   116      * @return Zend_Service_DeveloperGarden_ConferenceCall_ParticipantDetail
       
   117      */
       
   118     public function setLastName($lastName)
       
   119     {
       
   120         $this->lastName = $lastName;
       
   121         return $this;
       
   122     }
       
   123 
       
   124     /**
       
   125      * returns the value of $number
       
   126      *
       
   127      * @return string
       
   128      */
       
   129     public function getNumber()
       
   130     {
       
   131         return $this->number;
       
   132     }
       
   133 
       
   134     /**
       
   135      * sets $number
       
   136      *
       
   137      * @param string $number
       
   138      * @return Zend_Service_DeveloperGarden_ConferenceCall_ParticipantDetail
       
   139      */
       
   140     public function setNumber($number)
       
   141     {
       
   142         $this->number = $number;
       
   143         return $this;
       
   144     }
       
   145 
       
   146     /**
       
   147      * returns the value of $email
       
   148      *
       
   149      * @return string
       
   150      */
       
   151     public function getEmail()
       
   152     {
       
   153         return $this->email;
       
   154     }
       
   155 
       
   156     /**
       
   157      * sets $email
       
   158      *
       
   159      * @param string email
       
   160      * @return Zend_Service_DeveloperGarden_ConferenceCall_ParticipantDetail
       
   161      */
       
   162     public function setEmail($email)
       
   163     {
       
   164         $validator = new Zend_Validate_EmailAddress();
       
   165 
       
   166         if (!$validator->isValid($email)) {
       
   167             require_once 'Zend/Service/DeveloperGarden/Exception.php';
       
   168             throw new Zend_Service_DeveloperGarden_Exception('Not a valid e-mail address.');
       
   169         }
       
   170         $this->email = $email;
       
   171         return $this;
       
   172     }
       
   173 
       
   174     /**
       
   175      * returns the value of $flags
       
   176      *
       
   177      * @return integer
       
   178      */
       
   179     public function getFlags()
       
   180     {
       
   181         return $this->flags;
       
   182     }
       
   183 
       
   184     /**
       
   185      * sets $flags (ie, initiator flag)
       
   186      *
       
   187      * @param integer $flags
       
   188      * @return Zend_Service_DeveloperGarden_ConferenceCall_ParticipantDetail
       
   189      */
       
   190     public function setFlags($flags)
       
   191     {
       
   192         $this->flags = $flags;
       
   193         return $this;
       
   194     }
       
   195 }