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


PHP BaseModel::c方法代碼示例

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


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

示例1: c

 public function c($rq = null)
 {
     $type = ['employee' => 1, 'agency' => 2, 'doctor' => 3];
     $rq = rq();
     $rq['senderid'] = uid();
     $rq['sendername'] = username();
     if (he_is('agency')) {
         $rq['org'] = sess('org');
     }
     if (he_is('employee')) {
         $rq['org'] = sess('org');
     }
     // return his_chara()[0];
     $rq['sendertype'] = $type[his_chara()[0]];
     if (his_chara()[0] == 'agency') {
         $rq['recipienttype'] = 1;
         $rq['recipientid'] = 1;
         $rq['recipientname'] = 'admin';
     } elseif (his_chara()[0] == 'employee') {
         $rq['recipienttype'] = $type[$rq['recipienttype']];
     }
     // 驗證發信規則
     $valid = $this->verify($rq);
     if (!$valid) {
         return ee(2);
     }
     $rq['sendtime'] = date("Y-m-d H:i:s");
     return parent::c($rq);
 }
開發者ID:newset,項目名稱:robot,代碼行數:29,代碼來源:IMessage.php

示例2: c

 /**
  * 創建
  */
 public function c($rq = NULL)
 {
     $this->guarded = arr_except_vals($this->guarded, ['password']);
     if (!$rq) {
         $rq = rq();
     }
     return parent::c($rq);
 }
開發者ID:Aaronqcd,項目名稱:robot,代碼行數:11,代碼來源:IAgency.php

示例3: c

 /**
  * 創建
  */
 public function c($rq = null)
 {
     $this->guarded = arr_except_vals($this->guarded, ['password']);
     if (!$rq) {
         $rq = rq();
     }
     if (isset($rq['password'])) {
         $rq['password'] = hash_password($rq['password']);
     }
     return parent::c($rq);
 }
開發者ID:hellopsm,項目名稱:robot,代碼行數:14,代碼來源:IEmployee.php

示例4: c

 public function c($rq = NULL, $rules = NULL, $messages = NULL)
 {
     $rq = rq();
     $new = parent::c($rq, $this->createRule);
     if ($new['status'] == 1) {
         // 設置
         $query = $this->where('robot_id', $rq['robot_id']);
         $query->update(['recent' => 0]);
         $query->where('id', $new['d']['id'])->update(['recent' => 1]);
     }
     $new['rq'] = $rq;
     return $new;
 }
開發者ID:newset,項目名稱:robot,代碼行數:13,代碼來源:IRobotLeaseLog.php

示例5: c

 public function c($rq = NULL, $rules = NULL, $messages = NULL)
 {
     $rq = rqOnly(['action_type', 'memo', 'robot_id']);
     // 設置 id
     $rq['at'] = time();
     $rq['employee_id'] = Session::get('uid');
     if ($rq['action_type'] == 2) {
         // 更新狀態
         IRobot::where('id', $rq['robot_id'])->update(['status' => 1]);
     } else {
         if ($rq['action_type'] == 3) {
             IRobot::where('id', $rq['robot_id'])->update(['status' => 2]);
         } else {
             if ($rq['action_type'] == 4) {
                 IRobot::where('id', $rq['robot_id'])->update(['status' => 0]);
             }
         }
     }
     return parent::c($rq);
 }
開發者ID:newset,項目名稱:robot,代碼行數:20,代碼來源:IRobotLog.php


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