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


PHP CFunctions::loadMatchingObject方法代碼示例

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


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

示例1: CFunctions

$group_id = $group->_id;
// --------------------------------
// cabinet
$cabinet_text = CValue::post("text");
$cabinet_adresse = CValue::post("adresse");
$cabinet_ville = CValue::post("ville");
$cabinet_cp = CValue::post("cp");
$cabinet_tel = CValue::post("tel");
$cabinet_fax = CValue::post("fax");
$compta_partagee = CValue::post("compta_partagee");
$consult_partagee = CValue::post("consults_partagees");
$cabinet = new CFunctions();
$cabinet->group_id = $group_id;
$cabinet->type = "cabinet";
$cabinet->text = $cabinet_text;
$cabinet->loadMatchingObject();
//exist ? problem !
if ($cabinet->_id) {
    CAppUI::stepAjax("Cabinet-already_exist_name%s", UI_MSG_ERROR, $cabinet_text);
} else {
    $cabinet->actif = 1;
    $cabinet->facturable = 1;
    $cabinet->cp = $cabinet_cp;
    $cabinet->ville = $cabinet_ville;
    $cabinet->adresse = $cabinet_adresse;
    $cabinet->compta_partagee = $compta_partagee;
    $cabinet->consults_partagees = $consult_partagee;
    $cabinet->tel = $cabinet_tel;
    $cabinet->fax = $cabinet_fax;
    if ($msg = $cabinet->store()) {
        CAppUI::stepAjax($msg, UI_MSG_ERROR);
開發者ID:fbone,項目名稱:mediboard4,代碼行數:31,代碼來源:do_configure_cabinet.php

示例2: CUser

 if ($profil_name = $results[$i]["profil_name"]) {
     $profil = new CUser();
     $profil->user_username = $profil_name;
     $profil->loadMatchingObject();
     if ($profil->_id) {
         $mediuser->_profile_id = $profil->_id;
     } else {
         $unfound["profil_name"][$profil_name] = true;
     }
 }
 $group_id = CGroups::loadCurrent()->_id;
 // Fonction
 $function = new CFunctions();
 $function->group_id = $group_id;
 $function->text = $results[$i]["function_name"];
 $function->loadMatchingObject();
 if (!$function->_id) {
     if (in_array($results[$i]["type"], array("3", "4", "13"))) {
         $function->type = "cabinet";
     } else {
         $function->type = "administratif";
     }
     $function->color = "ffffff";
     $function->compta_partagee = 0;
     $function->consults_partagees = 1;
     $function->unescapeValues();
     $msg = $function->store();
     if ($msg) {
         CAppUI::setMsg($msg, UI_MSG_ERROR);
         $results[$i]["error"] = $msg;
         $results[$i]["username"] = "";
開發者ID:fbone,項目名稱:mediboard4,代碼行數:31,代碼來源:user_import_csv.php

示例3: createPraticien

 /**
  * Création du praticien
  *
  * @param CMediusers $mediuser Mediuser
  *
  * @return int
  */
 function createPraticien(CMediusers $mediuser)
 {
     $sender = $this->_ref_echange_hprim->_ref_sender;
     $functions = new CFunctions();
     $functions->text = CAppUI::conf("hprimxml functionPratImport");
     $functions->group_id = $sender->group_id;
     $functions->loadMatchingObject();
     if (!$functions->loadMatchingObject()) {
         $functions->type = "cabinet";
         $functions->compta_partagee = 0;
         $functions->store();
     }
     $mediuser->function_id = $functions->_id;
     $mediuser->makeUsernamePassword($mediuser->_user_first_name, $mediuser->_user_last_name, null, true);
     $user_type = CAppUI::conf("hprimxml user_type");
     $mediuser->_user_type = $user_type ? $user_type : 13;
     // Medecin
     $mediuser->actif = CAppUI::conf("hprimxml medecinActif") ? 1 : 0;
     $user = new CUser();
     $user->user_last_name = $mediuser->_user_last_name;
     $user->user_first_name = $mediuser->_user_first_name;
     $listPrat = $user->seek("{$user->user_last_name} {$user->user_first_name}");
     if (count($listPrat) == 1) {
         $user = reset($listPrat);
         $user->loadRefMediuser();
         $mediuser = $user->_ref_mediuser;
     } else {
         $mediuser->store();
     }
     return $mediuser->_id;
 }
開發者ID:fbone,項目名稱:mediboard4,代碼行數:38,代碼來源:CHPrimXMLEvenements.class.php


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