Пример #1
0
 protected function checkDataSufficiency()
 {
     parent::checkDataSufficiency();
     switch ($this->_type) {
         case self::PERSON:
             if ($this->_person->SurName === null || $this->_person->SurName === '') {
                 throw new Data_Insufficient_Exception(get_class($this) . '::SurName');
             }
             break;
         case self::COMPANY:
             if ($this->_company->BusinessName === null || $this->_company->BusinessName === '') {
                 throw new Data_Insufficient_Exception(get_class($this) . '::BusinessName');
             }
             break;
         default:
             throw new Kiwi_Exception('Kiwi_Client type unknown');
     }
 }