當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Family::LoadByFamily方法代碼示例

本文整理匯總了PHP中Family::LoadByFamily方法的典型用法代碼示例。如果您正苦於以下問題:PHP Family::LoadByFamily方法的具體用法?PHP Family::LoadByFamily怎麽用?PHP Family::LoadByFamily使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Family的用法示例。


在下文中一共展示了Family::LoadByFamily方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: remove_family

 /**
  * Remove a family
  *
  * @param string $passkey
  * @param string $strFamily
  * @return string
  */
 public function remove_family($passkey, $strFamily)
 {
     if (!$this->check_passkey($passkey)) {
         return self::FAIL_AUTH;
     }
     $family = Family::LoadByFamily($strFamily);
     if ($family) {
         try {
             $family->Delete();
         } catch (Exception $e) {
             _xls_log("SOAP ERROR : delete family {$strFamily} " . $e);
             return self::UNKNOWN_ERROR;
         }
     }
     return self::OK;
 }
開發者ID:uiDeveloper116,項目名稱:webstore,代碼行數:23,代碼來源:LegacysoapController.php

示例2: add_family

 /**
  * 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;
 }
開發者ID:uiDeveloper116,項目名稱:webstore,代碼行數:29,代碼來源:SoapController.php


注:本文中的Family::LoadByFamily方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。