当前位置: 首页>>代码示例>>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;未经允许,请勿转载。