当前位置: 首页>>代码示例>>PHP>>正文


PHP erLhcoreClassModelDepartament::fetch方法代码示例

本文整理汇总了PHP中erLhcoreClassModelDepartament::fetch方法的典型用法代码示例。如果您正苦于以下问题:PHP erLhcoreClassModelDepartament::fetch方法的具体用法?PHP erLhcoreClassModelDepartament::fetch怎么用?PHP erLhcoreClassModelDepartament::fetch使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在erLhcoreClassModelDepartament的用法示例。


在下文中一共展示了erLhcoreClassModelDepartament::fetch方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: __get

 public function __get($var)
 {
     switch ($var) {
         case 'user':
             $this->user = false;
             if ($this->user_id > 0) {
                 try {
                     $this->user = erLhcoreClassModelUser::fetch($this->user_id);
                 } catch (Exception $e) {
                     $this->user = false;
                 }
             }
             return $this->user;
             break;
         case 'department':
             $this->department = false;
             if ($this->department_id > 0) {
                 try {
                     $this->department = erLhcoreClassModelDepartament::fetch($this->department_id, true);
                 } catch (Exception $e) {
                     $this->department = false;
                 }
             }
             return $this->department;
             break;
         case 'msg_to_user':
             $this->msg_to_user = str_replace(array_keys($this->replaceData), array_values($this->replaceData), $this->msg);
             // If not all variables were replaced fallback to fallback message
             if (preg_match('/\\{[a-zA-Z0-9_]+\\}/i', $this->msg_to_user)) {
                 $this->msg_to_user = str_replace(array_keys($this->replaceData), array_values($this->replaceData), $this->fallback_msg);
             }
             return $this->msg_to_user;
             break;
         case 'message_title':
             if ($this->title != '') {
                 $this->message_title = $this->title;
             } else {
                 $this->message_title = $this->msg_to_user;
             }
             return $this->message_title;
             break;
         default:
             break;
     }
 }
开发者ID:niravpatel2008,项目名称:north-american-nemesis-new,代码行数:45,代码来源:erlhcoreclassmodelcannedmsg.php

示例2: __get

 public function __get($var)
 {
     switch ($var) {
         case 'left_menu':
             $this->left_menu = '';
             return $this->left_menu;
             break;
         case 'departament':
             $this->departament = erLhcoreClassModelDepartament::fetch($this->departament_id);
             return $this->departament;
             break;
         case 'name_department':
             $this->name_department = $this->name . ' (' . $this->departament . ')';
             return $this->name_department;
             break;
         default:
             break;
     }
 }
开发者ID:detain,项目名称:livehelperchat,代码行数:19,代码来源:erlhabstractmodelproduct.php

示例3: __get

 public function __get($var)
 {
     switch ($var) {
         case 'user':
             $this->user = erLhcoreClassModelUser::fetch($this->user_id);
             return $this->user;
             break;
         case 'lastactivity_ago':
             $this->lastactivity_ago = $this->user->lastactivity_ago;
             return $this->lastactivity_ago;
             break;
         case 'name_support':
             $this->name_support = $this->user->name_support;
             return $this->name_support;
             break;
         case 'name_official':
             $this->name_official = $this->user->name_official;
             return $this->name_official;
             break;
         case 'departments_names':
             $this->departments_names = array();
             $ids = $this->user->departments_ids;
             if ($ids != '') {
                 $parts = explode(',', $ids);
                 sort($parts);
                 foreach ($parts as $depId) {
                     if ($depId == 0) {
                         $this->departments_names[] = '∞';
                     } elseif ($depId > 0) {
                         try {
                             $dep = erLhcoreClassModelDepartament::fetch($depId, true);
                             $this->departments_names[] = $dep->name;
                         } catch (Exception $e) {
                         }
                     }
                 }
             }
             return $this->departments_names;
             break;
         default:
             break;
     }
 }
开发者ID:remdex,项目名称:livehelperchat,代码行数:43,代码来源:erlhcoreclassmodeluserdep.php

示例4: __get

 public function __get($var)
 {
     switch ($var) {
         case 'time_created_front':
             $this->time_created_front = date('Ymd') == date('Ymd', $this->time) ? date(erLhcoreClassModule::$dateHourFormat, $this->time) : date(erLhcoreClassModule::$dateDateHourFormat, $this->time);
             return $this->time_created_front;
             break;
         case 'user_closed_ts_front':
             $this->user_closed_ts_front = date('Ymd') == date('Ymd', $this->user_closed_ts) ? date(erLhcoreClassModule::$dateHourFormat, $this->user_closed_ts) : date(erLhcoreClassModule::$dateDateHourFormat, $this->user_closed_ts);
             return $this->user_closed_ts_front;
             break;
         case 'is_operator_typing':
             $this->is_operator_typing = $this->operator_typing > time() - 60;
             // typing is considered if status did not changed for 30 seconds
             return $this->is_operator_typing;
             break;
         case 'is_user_typing':
             $this->is_user_typing = $this->user_typing > time() - 10;
             // typing is considered if status did not changed for 30 seconds
             return $this->is_user_typing;
             break;
         case 'wait_time_seconds':
             $this->wait_time_seconds = time() - $this->time;
             return $this->wait_time_seconds;
         case 'wait_time_front':
             $this->wait_time_front = erLhcoreClassChat::formatSeconds($this->wait_time);
             return $this->wait_time_front;
             break;
         case 'wait_time_pending':
             $this->wait_time_pending = erLhcoreClassChat::formatSeconds(time() - $this->time);
             return $this->wait_time_pending;
             break;
         case 'chat_duration_front':
             $this->chat_duration_front = erLhcoreClassChat::formatSeconds($this->chat_duration);
             return $this->chat_duration_front;
             break;
         case 'user_name':
             return $this->user_name = (string) $this->user;
             break;
         case 'plain_user_name':
             $this->plain_user_name = false;
             if ($this->user !== false) {
                 $this->plain_user_name = (string) $this->user->name_support;
             }
             return $this->plain_user_name;
             break;
         case 'user':
             $this->user = false;
             if ($this->user_id > 0) {
                 try {
                     $this->user = erLhcoreClassModelUser::fetch($this->user_id, true);
                 } catch (Exception $e) {
                     $this->user = false;
                 }
             }
             return $this->user;
             break;
         case 'operator_typing_user':
             $this->operator_typing_user = false;
             if ($this->operator_typing_id > 0) {
                 try {
                     $this->operator_typing_user = erLhcoreClassModelUser::fetch($this->operator_typing_id);
                 } catch (Exception $e) {
                     $this->operator_typing_user = false;
                 }
             }
             return $this->operator_typing_user;
             break;
         case 'online_user':
             $this->online_user = false;
             if ($this->online_user_id > 0) {
                 try {
                     $this->online_user = erLhcoreClassModelChatOnlineUser::fetch($this->online_user_id);
                 } catch (Exception $e) {
                     $this->online_user = false;
                 }
             }
             return $this->online_user;
             break;
         case 'department':
             $this->department = false;
             if ($this->dep_id > 0) {
                 try {
                     $this->department = erLhcoreClassModelDepartament::fetch($this->dep_id, true);
                 } catch (Exception $e) {
                 }
             }
             return $this->department;
             break;
         case 'product':
             $this->product = false;
             if ($this->product_id > 0) {
                 try {
                     $this->product = erLhAbstractModelProduct::fetch($this->product_id, true);
                 } catch (Exception $e) {
                 }
             }
             return $this->product;
             break;
         case 'product_name':
//.........这里部分代码省略.........
开发者ID:keenick,项目名称:livehelperchat,代码行数:101,代码来源:erlhcoreclassmodelchat.php

示例5: __get

 public function __get($var)
 {
     switch ($var) {
         case 'time_created_front':
             $this->time_created_front = date('Ymd') == date('Ymd', $this->time) ? date(erLhcoreClassModule::$dateHourFormat, $this->time) : date(erLhcoreClassModule::$dateDateHourFormat, $this->time);
             return $this->time_created_front;
             break;
         case 'user_closed_ts_front':
             $this->user_closed_ts_front = date('Ymd') == date('Ymd', $this->user_closed_ts) ? date(erLhcoreClassModule::$dateHourFormat, $this->user_closed_ts) : date(erLhcoreClassModule::$dateDateHourFormat, $this->user_closed_ts);
             return $this->user_closed_ts_front;
             break;
         case 'is_operator_typing':
             $this->is_operator_typing = $this->operator_typing > time() - 60;
             // typing is considered if status did not changed for 30 seconds
             return $this->is_operator_typing;
             break;
         case 'is_user_typing':
             $this->is_user_typing = $this->user_typing > time() - 10;
             // typing is considered if status did not changed for 30 seconds
             return $this->is_user_typing;
             break;
         case 'wait_time_front':
             $this->wait_time_front = erLhcoreClassChat::formatSeconds($this->wait_time);
             return $this->wait_time_front;
             break;
         case 'chat_duration_front':
             $this->chat_duration_front = erLhcoreClassChat::formatSeconds($this->chat_duration);
             return $this->chat_duration_front;
             break;
         case 'user_name':
             return $this->user_name = (string) $this->user;
             break;
         case 'user':
             $this->user = false;
             if ($this->user_id > 0) {
                 try {
                     $this->user = erLhcoreClassModelUser::fetch($this->user_id, true);
                 } catch (Exception $e) {
                     $this->user = false;
                 }
             }
             return $this->user;
             break;
         case 'operator_typing_user':
             $this->operator_typing_user = false;
             if ($this->operator_typing_id > 0) {
                 try {
                     $this->operator_typing_user = erLhcoreClassModelUser::fetch($this->operator_typing_id);
                 } catch (Exception $e) {
                     $this->operator_typing_user = false;
                 }
             }
             return $this->operator_typing_user;
             break;
         case 'online_user':
             $this->online_user = false;
             if ($this->online_user_id > 0) {
                 try {
                     $this->online_user = erLhcoreClassModelChatOnlineUser::fetch($this->online_user_id);
                 } catch (Exception $e) {
                     $this->online_user = false;
                 }
             }
             return $this->online_user;
             break;
         case 'department':
             $this->department = false;
             if ($this->dep_id > 0) {
                 try {
                     $this->department = erLhcoreClassModelDepartament::fetch($this->dep_id, true);
                 } catch (Exception $e) {
                 }
             }
             return $this->department;
             break;
         case 'department_name':
             return $this->department_name = (string) $this->department;
             break;
         case 'screenshot':
             $this->screenshot = false;
             if ($this->screenshot_id > 0) {
                 try {
                     $this->screenshot = erLhcoreClassModelChatFile::fetch($this->screenshot_id);
                 } catch (Exception $e) {
                 }
             }
             return $this->screenshot;
             break;
         case 'unread_time':
             $diff = time() - $this->last_user_msg_time;
             $hours = floor($diff / 3600);
             $minits = floor(($diff - $hours * 3600) / 60);
             $seconds = $diff - $hours * 3600 - $minits * 60;
             $this->unread_time = array('hours' => $hours, 'minits' => $minits, 'seconds' => $seconds);
             return $this->unread_time;
             break;
         case 'user_tz_identifier_time':
             $date = new DateTime(null, new DateTimeZone($this->user_tz_identifier));
             $this->user_tz_identifier_time = $date->format(erLhcoreClassModule::$dateHourFormat);
             return $this->user_tz_identifier_time;
//.........这里部分代码省略.........
开发者ID:nagyistoce,项目名称:livehelperchat,代码行数:101,代码来源:erlhcoreclassmodelchat.php

示例6: __get

 public function __get($var)
 {
     switch ($var) {
         case 'time_created_front':
             $this->time_created_front = date('Ymd') == date('Ymd', $this->time) ? date(erLhcoreClassModule::$dateHourFormat, $this->time) : date(erLhcoreClassModule::$dateDateHourFormat, $this->time);
             return $this->time_created_front;
             break;
         case 'user_closed_ts_front':
             $this->user_closed_ts_front = date('Ymd') == date('Ymd', $this->user_closed_ts) ? date(erLhcoreClassModule::$dateHourFormat, $this->user_closed_ts) : date(erLhcoreClassModule::$dateDateHourFormat, $this->user_closed_ts);
             return $this->user_closed_ts_front;
             break;
         case 'is_operator_typing':
             $this->is_operator_typing = $this->operator_typing > time() - 60;
             // typing is considered if status did not changed for 30 seconds
             return $this->is_operator_typing;
             break;
         case 'is_user_typing':
             $this->is_user_typing = $this->user_typing > time() - 10;
             // typing is considered if status did not changed for 30 seconds
             return $this->is_user_typing;
             break;
         case 'wait_time_seconds':
             $this->wait_time_seconds = time() - $this->time;
             return $this->wait_time_seconds;
         case 'wait_time_front':
             $this->wait_time_front = erLhcoreClassChat::formatSeconds($this->wait_time);
             return $this->wait_time_front;
             break;
         case 'wait_time_pending':
             $this->wait_time_pending = erLhcoreClassChat::formatSeconds(time() - $this->time);
             return $this->wait_time_pending;
             break;
         case 'chat_duration_front':
             $this->chat_duration_front = erLhcoreClassChat::formatSeconds($this->chat_duration);
             return $this->chat_duration_front;
             break;
         case 'user_name':
             return $this->user_name = (string) $this->user;
             break;
         case 'plain_user_name':
             $this->plain_user_name = false;
             if ($this->user !== false) {
                 $this->plain_user_name = (string) $this->user->name_support;
             }
             return $this->plain_user_name;
             break;
         case 'user':
             $this->user = false;
             if ($this->user_id > 0) {
                 try {
                     $this->user = erLhcoreClassModelUser::fetch($this->user_id, true);
                 } catch (Exception $e) {
                     $this->user = false;
                 }
             }
             return $this->user;
             break;
         case 'operator_typing_user':
             $this->operator_typing_user = false;
             if ($this->operator_typing_id > 0) {
                 try {
                     $this->operator_typing_user = erLhcoreClassModelUser::fetch($this->operator_typing_id);
                 } catch (Exception $e) {
                     $this->operator_typing_user = false;
                 }
             }
             return $this->operator_typing_user;
             break;
         case 'online_user':
             $this->online_user = false;
             if ($this->online_user_id > 0) {
                 try {
                     $this->online_user = erLhcoreClassModelChatOnlineUser::fetch($this->online_user_id);
                 } catch (Exception $e) {
                     $this->online_user = false;
                 }
             }
             return $this->online_user;
             break;
         case 'department':
             $this->department = false;
             if ($this->dep_id > 0) {
                 try {
                     $this->department = erLhcoreClassModelDepartament::fetch($this->dep_id, true);
                 } catch (Exception $e) {
                 }
             }
             return $this->department;
             break;
         case 'department_name':
             return $this->department_name = (string) $this->department;
             break;
         case 'number_in_queue':
             $this->number_in_queue = 1;
             if ($this->status == self::STATUS_PENDING_CHAT) {
                 $this->number_in_queue = erLhcoreClassChat::getCount(array('filterlt' => array('id' => $this->id), 'filter' => array('dep_id' => $this->dep_id, 'status' => self::STATUS_PENDING_CHAT))) + 1;
             }
             return $this->number_in_queue;
             break;
         case 'screenshot':
//.........这里部分代码省略.........
开发者ID:kenjiro7,项目名称:livehelperchat,代码行数:101,代码来源:erlhcoreclassmodelchat.php

示例7: __get

 public function __get($var)
 {
     switch ($var) {
         case 'survey':
             $this->survey = '';
             return $this->survey;
             break;
         case 'ftime_front':
             $this->ftime_front = date('Ymd') == date('Ymd', $this->ftime) ? date(erLhcoreClassModule::$dateHourFormat, $this->ftime) : date(erLhcoreClassModule::$dateDateHourFormat, $this->ftime);
             return $this->ftime_front;
             break;
         case 'user':
             try {
                 $this->user = erLhcoreClassModelUser::fetch($this->user_id, true);
             } catch (Exception $e) {
                 $this->user = false;
             }
             return $this->user;
             break;
         case 'is_filled':
             return !is_null($this->id);
             break;
         case 'department':
             $this->department = false;
             if ($this->dep_id > 0) {
                 try {
                     $this->department = erLhcoreClassModelDepartament::fetch($this->dep_id, true);
                 } catch (Exception $e) {
                 }
             }
             return $this->department;
             break;
         case 'department_name':
             return $this->department_name = (string) $this->department;
             break;
         case 'average_stars':
             return round($this->virtual_total_stars / $this->virtual_chats_number, 2);
             break;
         default:
             break;
     }
 }
开发者ID:Adeelgill,项目名称:livehelperchat,代码行数:42,代码来源:erlhabstractmodelsurveyitem.php


注:本文中的erLhcoreClassModelDepartament::fetch方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。