Example #1
0
 /**
  * @param CContact $oContact
  *
  * @return bool
  */
 public function createContact($oContact)
 {
     $bResult = false;
     try {
         if ($oContact->validate()) {
             $bResult = $this->oStorage->createContact($oContact);
         }
     } catch (CApiBaseException $oException) {
         $bResult = false;
         $this->setLastException($oException);
     }
     if ($bResult) {
         $oApiVoiceManager = CApi::Manager('voice');
         if ($oApiVoiceManager) {
             $oApiVoiceManager->flushCallersNumbersCache($oContact->IdUser);
         }
     }
     return $bResult;
 }