/**
  * Add a family
  *
  * @param string $passkey
  * @param string $strFamily
  * @return string
  */
 public function add_family($passkey, $strFamily)
 {
     if (!$this->check_passkey($passkey)) {
         return self::FAIL_AUTH;
     }
     if (trim($strFamily) == '') {
         //ignore blank families
         return self::OK;
     }
     $family = Family::LoadByFamily($strFamily);
     if (!$family) {
         $family = new Family();
     }
     $family->family = $strFamily;
     $family->request_url = _xls_seo_url($strFamily);
     if (!$family->save()) {
         Yii::log("SOAP ERROR : Error saving family {$strFamily} " . print_r($family->getErrors()), 'error', 'application.' . __CLASS__ . "." . __FUNCTION__);
         return self::UNKNOWN_ERROR . " Error saving family {$strFamily} " . print_r($family->getErrors(), true);
     }
     return self::OK;
 }
 /**
  * Add a family
  *
  * @param string $passkey
  * @param string $strFamily
  * @return string
  * @throws SoapFault
  * @soap
  */
 public function add_family($passkey, $strFamily)
 {
     self::check_passkey($passkey);
     if (trim($strFamily) == '') {
         //ignore blank families
         return self::OK;
     }
     $family = Family::LoadByFamily($strFamily);
     if (!$family) {
         $family = new Family();
     }
     $family->family = $strFamily;
     $family->request_url = _xls_seo_url($strFamily);
     if (!$family->save()) {
         $strMsg = "Error saving family {$strFamily}";
         Yii::log("SOAP ERROR : {$strMsg} " . print_r($family->getErrors(), true), CLogger::LEVEL_ERROR, 'application.' . __CLASS__ . "." . __FUNCTION__);
         throw new SoapFault($strMsg, WsSoapException::ERROR_UNKNOWN);
     }
     return self::OK;
 }