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


PHP erLhcoreClassModelChatConfig::fetch方法代码示例

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


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

示例1: setupSMTP

 public static function setupSMTP(PHPMailer &$phpMailer)
 {
     // Allow extension override mail settings
     $response = erLhcoreClassChatEventDispatcher::getInstance()->dispatch('chatmail.setup_smtp', array('phpmailer' => &$phpMailer));
     if ($response !== false && isset($response['status']) && $response['status'] == erLhcoreClassChatEventDispatcher::STOP_WORKFLOW) {
         return;
     }
     $smtpData = erLhcoreClassModelChatConfig::fetch('smtp_data');
     $data = (array) $smtpData->data;
     if (isset($data['sender']) && $data['sender'] != '') {
         $phpMailer->Sender = $data['sender'];
     }
     if ($phpMailer->From == 'root@localhost') {
         $phpMailer->From = $data['default_from'];
     }
     if ($phpMailer->FromName == 'Root User') {
         $phpMailer->FromName = $data['default_from_name'];
     }
     if (isset($data['use_smtp']) && $data['use_smtp'] == 1) {
         $phpMailer->IsSMTP();
         $phpMailer->Host = $data['host'];
         $phpMailer->Port = $data['port'];
         if ($data['username'] != '' && $data['password'] != '') {
             $phpMailer->Username = $data['username'];
             $phpMailer->Password = $data['password'];
             $phpMailer->SMTPAuth = true;
             $phpMailer->From = isset($data['default_from']) ? $data['default_from'] : $data['username'];
         } else {
             $phpMailer->From = '';
         }
     }
 }
开发者ID:sirromas,项目名称:medical,代码行数:32,代码来源:lhchatmail.php

示例2: __get

 public function __get($var)
 {
     switch ($var) {
         case 'settings':
             $this->settings = erLhcoreClassModelChatConfig::fetch('sugarcrm_data')->data;
             return $this->settings;
             break;
         default:
             break;
     }
 }
开发者ID:noikiy,项目名称:sugarcrm,代码行数:11,代码来源:bootstrap.php

示例3: openChatWidget

 /**
  * Opening chat widget
  * */
 public static function openChatWidget($params)
 {
     try {
         $chatPaid = erLhcoreClassModelChatPaid::fetch($params['pchat']);
         $paidchatData = erLhcoreClassModelChatConfig::fetch('paidchat_data');
         $data = (array) $paidchatData->data;
         if ((!isset($data['paidchat_read_denied']) || $data['paidchat_read_denied'] == 0) && $chatPaid->chat_id == $params['chat']->id) {
             $params['tpl']->set('paid_chat_params', array('allow_read' => true));
         }
     } catch (Exception $e) {
     }
 }
开发者ID:detain,项目名称:livehelperchat,代码行数:15,代码来源:lhchatpaid.php

示例4: setupSMTP

 public static function setupSMTP(PHPMailer &$phpMailer)
 {
     $smtpData = erLhcoreClassModelChatConfig::fetch('smtp_data');
     $data = (array) $smtpData->data;
     if (isset($data['use_smtp']) && $data['use_smtp'] == 1) {
         $phpMailer->IsSMTP();
         $phpMailer->Host = $data['host'];
         $phpMailer->Port = $data['port'];
         if ($data['username'] != '' && $data['password'] != '') {
             $phpMailer->Username = $data['username'];
             $phpMailer->Password = $data['password'];
             $phpMailer->SMTPAuth = true;
         }
     }
 }
开发者ID:sudogitguy,项目名称:livehelperchat,代码行数:15,代码来源:lhchatmail.php

示例5: getSpeechInstance

 public static function getSpeechInstance(erLhcoreClassModelChat $chat)
 {
     $chatLanguageSession = null;
     $chatSpeech = erLhcoreClassModelSpeechChatLanguage::getList(array('filter' => array('chat_id' => $chat->id)));
     if (empty($chatSpeech)) {
         $chatLanguageSession = new erLhcoreClassModelSpeechChatLanguage();
         $chatLanguageSession->chat_id = $chat->id;
         $speechUserLanguage = erLhcoreClassModelUserSetting::getSetting('speech_language', '');
         $speechUserDialect = erLhcoreClassModelUserSetting::getSetting('speech_dialect', '');
         if ($speechUserLanguage != '' && $speechUserDialect != '') {
             $chatLanguageSession->dialect = $speechUserDialect;
             $chatLanguageSession->language_id = $speechUserLanguage;
         } else {
             $speechData = erLhcoreClassModelChatConfig::fetch('speech_data');
             $data = (array) $speechData->data;
             $chatLanguageSession->language_id = $data['language'];
             $chatLanguageSession->dialect = $data['dialect'];
         }
     } else {
         $chatLanguageSession = array_pop($chatSpeech);
     }
     return $chatLanguageSession;
 }
开发者ID:sirromas,项目名称:medical,代码行数:23,代码来源:lhspeech.php

示例6: setupSMTP

 public static function setupSMTP(PHPMailer &$phpMailer)
 {
     $smtpData = erLhcoreClassModelChatConfig::fetch('smtp_data');
     $data = (array) $smtpData->data;
     if (isset($data['use_smtp']) && $data['use_smtp'] == 1) {
         $phpMailer->IsSMTP();
         $phpMailer->Host = $data['host'];
         $phpMailer->Port = $data['port'];
         if ($data['username'] != '' && $data['password'] != '') {
             $phpMailer->Username = $data['username'];
             $phpMailer->Password = $data['password'];
             $phpMailer->SMTPAuth = true;
         }
     }
     if (isset($data['sender']) && $data['sender'] != '') {
         $phpMailer->Sender = $data['sender'];
     }
     if ($phpMailer->From == 'root@localhost') {
         $phpMailer->From = $data['default_from'];
     }
     if ($phpMailer->FromName == 'Root User') {
         $phpMailer->FromName = $data['default_from_name'];
     }
 }
开发者ID:nagyistoce,项目名称:livehelperchat,代码行数:24,代码来源:lhchatmail.php

示例7: trim

<?php

$cfgSite = erConfigClassLhConfig::getInstance();
$secretHash = $cfgSite->getSetting('site', 'secrethash');
if ($Params['user_parameters']['validation_hash'] == sha1(sha1($Params['user_parameters']['email'] . $secretHash) . $secretHash)) {
    $accept = erLhcoreClassModelChatAccept::fetchByHash($Params['user_parameters']['hash']);
    if ($accept !== false) {
        $chat_id = $accept->chat_id;
        if ($accept->wused == 0) {
            $userID = erLhcoreClassModelUser::fetchUserByEmail($Params['user_parameters']['email'], trim($Params['user_parameters']['email']) != '' ? trim($Params['user_parameters']['email']) : false);
            if ($userID !== false && $accept->ctime > time() - erLhcoreClassModelChatConfig::fetch('accept_chat_link_timeout')->current_value) {
                $accept->wused = 1;
                $accept->saveThis();
                erLhcoreClassUser::instance()->setLoggedUser($userID);
                erLhcoreClassModule::redirect('chat/single', '/' . $chat_id);
                exit;
            } else {
                erLhcoreClassModule::redirect('user/login', '/(r)/' . rawurlencode(base64_encode('chat/single/' . $chat_id)));
                exit;
            }
        } else {
            erLhcoreClassModule::redirect('user/login', '/(r)/' . rawurlencode(base64_encode('chat/single/' . $chat_id)));
            exit;
        }
        erLhcoreClassModelChatAccept::cleanup();
    }
}
erLhcoreClassModule::redirect('user/login');
exit;
开发者ID:Adeelgill,项目名称:livehelperchat,代码行数:29,代码来源:accept.php

示例8: isset

 $chat->session_referrer = isset($_POST['r']) ? $_POST['r'] : '';
 if ($chat->nick == '') {
     $chat->nick = erTranslationClassLhTranslation::getInstance()->getTranslation('chat/startchat', 'Visitor');
 }
 erLhcoreClassModelChat::detectLocation($chat);
 $chat->priority = is_numeric($Params['user_parameters_unordered']['priority']) ? (int) $Params['user_parameters_unordered']['priority'] : $chat->department->priority;
 $chat->chat_initiator = erLhcoreClassModelChat::CHAT_INITIATOR_PROACTIVE;
 // Store chat
 erLhcoreClassChat::getSession()->save($chat);
 // Mark as user has read message from operator.
 $userInstance->message_seen = 1;
 $userInstance->message_seen_ts = time();
 $userInstance->chat_id = $chat->id;
 $userInstance->saveThis();
 $chat->online_user_id = $userInstance->id;
 if (erLhcoreClassModelChatConfig::fetch('track_footprint')->current_value == 1) {
     erLhcoreClassModelChatOnlineUserFootprint::assignChatToPageviews($userInstance);
 }
 // Store Message from operator
 $msg = new erLhcoreClassModelmsg();
 $msg->msg = trim($userInstance->operator_message);
 $msg->chat_id = $chat->id;
 $msg->name_support = $userInstance->operator_user !== false ? trim($userInstance->operator_user->name . ' ' . $userInstance->operator_user->surname) : (!empty($userInstance->operator_user_proactive) ? $userInstance->operator_user_proactive : erTranslationClassLhTranslation::getInstance()->getTranslation('chat/startchat', 'Live Support'));
 $msg->user_id = $userInstance->operator_user_id > 0 ? $userInstance->operator_user_id : 1;
 $msg->time = time() - 7;
 // Deduct 7 seconds so for user all looks more natural
 erLhcoreClassChat::getSession()->save($msg);
 // Store User Message
 $msg = new erLhcoreClassModelmsg();
 $msg->msg = trim($inputData->question);
 $msg->chat_id = $chat->id;
开发者ID:p4prawin,项目名称:livechat,代码行数:31,代码来源:readoperatormessage.php

示例9: array

<?php

$tpl = erLhcoreClassTemplate::getInstance('lhdocshare/configuration.tpl.php');
$docSharer = erLhcoreClassModelChatConfig::fetch('doc_sharer');
$data = (array) $docSharer->data;
if (isset($_POST['StoreConfiguration'])) {
    $definition = array('LibreOfficePath' => new ezcInputFormDefinitionElement(ezcInputFormDefinitionElement::OPTIONAL, 'string'), 'SupportedExtensions' => new ezcInputFormDefinitionElement(ezcInputFormDefinitionElement::OPTIONAL, 'string'), 'PdftoppmPath' => new ezcInputFormDefinitionElement(ezcInputFormDefinitionElement::OPTIONAL, 'string'), 'HttpUserName' => new ezcInputFormDefinitionElement(ezcInputFormDefinitionElement::OPTIONAL, 'string'), 'HttpGroupName' => new ezcInputFormDefinitionElement(ezcInputFormDefinitionElement::OPTIONAL, 'string'), 'BackgroundProcess' => new ezcInputFormDefinitionElement(ezcInputFormDefinitionElement::OPTIONAL, 'boolean'), 'MaxFileSize' => new ezcInputFormDefinitionElement(ezcInputFormDefinitionElement::OPTIONAL, 'int', array('min_range' => 2)), 'PdftoppmLimit' => new ezcInputFormDefinitionElement(ezcInputFormDefinitionElement::OPTIONAL, 'int', array('min_range' => 0)));
    $Errors = array();
    $form = new ezcInputForm(INPUT_POST, $definition);
    $Errors = array();
    if (!isset($_POST['csfr_token']) || !$currentUser->validateCSFRToken($_POST['csfr_token'])) {
        erLhcoreClassModule::redirect('docshare/configuration');
        exit;
    }
    if ($form->hasValidData('LibreOfficePath')) {
        $data['libre_office_path'] = $form->LibreOfficePath;
    } else {
        $data['libre_office_path'] = '/usr/bin/libreoffice';
    }
    if ($form->hasValidData('PdftoppmPath')) {
        $data['pdftoppm_path'] = $form->PdftoppmPath;
    } else {
        $data['pdftoppm_path'] = '/usr/bin/pdftoppm';
    }
    if ($form->hasValidData('PdftoppmLimit')) {
        $data['pdftoppm_limit'] = $form->PdftoppmLimit;
    } else {
        $data['pdftoppm_limit'] = '0';
    }
    if ($form->hasValidData('HttpUserName')) {
        $data['http_user_name'] = $form->HttpUserName;
开发者ID:sudogitguy,项目名称:livehelperchat,代码行数:31,代码来源:configuration.php

示例10: json_encode

    echo json_encode(array('third' => erTranslationClassLhTranslation::getInstance()->getTranslation('chat/onlineusers', 'User has not seen a message from the operator, or the message window is still open.'), 'msg_seen' => erTranslationClassLhTranslation::getInstance()->getTranslation('chat/onlineusers', 'Seen'), 'msg_not_seen' => erTranslationClassLhTranslation::getInstance()->getTranslation('chat/onlineusers', 'Unseen'), 'second' => erTranslationClassLhTranslation::getInstance()->getTranslation('chat/onlineusers', 'User has seen the message from the operator.'), 'first' => erTranslationClassLhTranslation::getInstance()->getTranslation('chat/onlineusers', 'User does not have any messages from the operator')), JSON_HEX_APOS);
    ?>
'>
<thead>
<tr>
    <th width="5%" nowrap><a class="icon-clock" ng-click="online.predicate = 'last_visit'; online.reverse=!online.reverse" title="<?php 
    echo erTranslationClassLhTranslation::getInstance()->getTranslation('chat/onlineusers', 'Last activity');
    ?>
" ></a><a class="icon-clock" ng-click="online.predicate = 'time_on_site'; online.reverse=!online.reverse" title="<?php 
    echo erTranslationClassLhTranslation::getInstance()->getTranslation('chat/onlineusers', 'Time on site');
    ?>
"></a><a class="icon-clock" ng-click="online.predicate = 'visitor_tz_time'; online.reverse=!online.reverse" title="<?php 
    echo erTranslationClassLhTranslation::getInstance()->getTranslation('chat/onlineusers', 'Visitor local time');
    ?>
"></a><?php 
    if (erLhcoreClassModelChatConfig::fetch('track_is_online')->current_value == 1) {
        ?>
<a class="icon-clock" ng-click="online.predicate = 'last_check_time'; online.reverse=!online.reverse" title="<?php 
        echo erTranslationClassLhTranslation::getInstance()->getTranslation('chat/onlineusers', 'By user status on site');
        ?>
"></a><?php 
    }
    ?>
</th>
    <th width="50%"><a href="" ng-click="online.predicate = 'current_page'; online.reverse=!online.reverse" /><?php 
    echo erTranslationClassLhTranslation::getInstance()->getTranslation('chat/onlineusers', 'Page');
    ?>
</a></th>
    <th width="30%"><a href="" ng-click="online.predicate = 'referrer'; online.reverse=!online.reverse" /><?php 
    echo erTranslationClassLhTranslation::getInstance()->getTranslation('chat/onlineusers', 'Came from');
    ?>
开发者ID:p4prawin,项目名称:livechat,代码行数:31,代码来源:section_online_users.tpl.php

示例11: isset

<?php

$is_root = !isset($_GET['nomenu']) || isset($_GET['nomenu']) && empty($_GET['nomenu']);
?>
<div class="row footer-row<?php 
echo $is_root ? "" : " hidden";
?>
">
    <div class="columns col-xs-12">
        <p class="pull-right"><a target="_blank" href="http://livehelperchat.com">Live Helper Chat &copy; <?php 
echo date('Y');
?>
</a></p>
        <p><a href="<?php 
echo erLhcoreClassModelChatConfig::fetch('customer_site_url')->current_value;
?>
"><?php 
echo htmlspecialchars(erLhcoreClassModelChatConfig::fetch('customer_company_name')->current_value);
?>
</a></p>
    </div>
</div>

<?php 
include_once erLhcoreClassDesign::designtpl('pagelayouts/parts/page_footer_js.tpl.php');
include_once erLhcoreClassDesign::designtpl('pagelayouts/parts/page_footer_js_extension_multiinclude.tpl.php');
开发者ID:homeonline,项目名称:lhchat,代码行数:26,代码来源:page_footer.tpl.php

示例12: header

 if ($chat->hash == $Params['user_parameters']['hash'] && erLhcoreClassChat::canReopen($chat, true)) {
     // Is IP blocked directly?
     if (erLhcoreClassModelChatBlockedUser::getCount(array('filter' => array('ip' => erLhcoreClassIPDetect::getIP()))) > 0) {
         header('Location: ' . $_SERVER['HTTP_REFERER']);
         exit;
     }
     /**
      * is IP range blocked
      * */
     $ignorable_ip = erLhcoreClassModelChatConfig::fetch('banned_ip_range')->current_value;
     if ($ignorable_ip != '' && erLhcoreClassIPDetect::isIgnored(erLhcoreClassIPDetect::getIP(), explode(',', $ignorable_ip))) {
         header('Location: ' . $_SERVER['HTTP_REFERER']);
         exit;
     }
     if ($chat->status != erLhcoreClassModelChat::STATUS_ACTIVE_CHAT && $chat->status != erLhcoreClassModelChat::STATUS_PENDING_CHAT) {
         if (erLhcoreClassModelChatConfig::fetch('reopen_as_new')->current_value == 1 || $chat->user_id == 0) {
             // Reset to fresh state to workflow triggers to work
             $chat->status = erLhcoreClassModelChat::STATUS_PENDING_CHAT;
             $chat->nc_cb_executed = 0;
             $chat->na_cb_executed = 0;
             $chat->time = time();
             // Set time to new
         } else {
             $chat->status = erLhcoreClassModelChat::STATUS_ACTIVE_CHAT;
         }
         $chat->updateThis();
     }
     erLhcoreClassChatEventDispatcher::getInstance()->dispatch('chat.user_reopened', array('chat' => &$chat));
     if ($Params['user_parameters_unordered']['mode'] == 'widget') {
         // Redirect user
         erLhcoreClassModule::redirect('chat/chatwidgetchat', '/' . $chat->id . '/' . $chat->hash . $modeAppend . $modeAppendTheme);
开发者ID:detain,项目名称:livehelperchat,代码行数:31,代码来源:reopen.php

示例13: onlineUserPageViewLogged

 /**
  * get's callend then online user does a pageview
  *
  * @param array $params            
  */
 public function onlineUserPageViewLogged($params)
 {
     if ($this->settings['enabled'] == true && $this->settings['online_visitors_tracking'] == true) {
         $onlineOptions = erLhcoreClassModelChatConfig::fetch('xmppservice_options')->data;
         if (isset($onlineOptions['track_online']) && $onlineOptions['track_online'] == true) {
             if (($xmppAccount = erLhcoreClassModelXMPPAccount::findOne(array('filter' => array('type' => erLhcoreClassModelXMPPAccount::USER_TYPE_VISITOR, 'user_id' => $params['ou']->id)))) !== false) {
                 if ($this->settings['handler'] == 'rpc' && is_object($params['tpl']) && $this->settings['online_visitors_tracking'] == true) {
                     /**
                      * In the future then websockets will support attatch method this could be used
                      * */
                     /* $xmppAccount->attach_data = erLhcoreClassExtensionXmppserviceHandler::prebindSession(array(
                            'username' => $xmppAccount->username,
                            'password' => $xmppAccount->password,
                            'host' => $this->settings['prebind_host'] . $xmppAccount->username_plain,
                        )); */
                     $params['tpl']->set('xmppAccount', $xmppAccount);
                 }
                 // Forward this information to NodeJS server
                 erLhcoreClassExtensionXmppserviceHandler::onlineUserPageViewLogged(array('xmpp_account' => $xmppAccount, 'ou' => $params['ou'], 'host_login' => $this->settings['host_login'], 'node_api_server' => $this->settings['node_api_server'], 'handler' => $this->settings['handler'], 'xmpp_host' => $this->settings['xmpp_host'], 'rpc_server' => $this->settings['rpc_server'], 'rpc_username' => $this->settings['rpc_username'], 'rpc_password' => $this->settings['rpc_password'], 'rpc_account_host' => $this->settings['rpc_account_host']));
             }
         }
     }
 }
开发者ID:noikiy,项目名称:xmpp-chat,代码行数:28,代码来源:bootstrap.php

示例14: isset

$timeout = isset($Params['user_parameters_unordered']['timeout']) && is_numeric($Params['user_parameters_unordered']['timeout']) ? (int) $Params['user_parameters_unordered']['timeout'] : 30;
$maxrows = isset($Params['user_parameters_unordered']['maxrows']) && is_numeric($Params['user_parameters_unordered']['maxrows']) ? (int) $Params['user_parameters_unordered']['maxrows'] : 50;
$filter = array('offset' => 0, 'limit' => $maxrows, 'sort' => 'last_visit DESC', 'filtergt' => array('last_visit' => time() - $timeout));
$department = isset($Params['user_parameters_unordered']['department']) && is_numeric($Params['user_parameters_unordered']['department']) ? (int) $Params['user_parameters_unordered']['department'] : false;
if ($department !== false) {
    $filter['filter']['dep_id'] = $department;
}
/**
 * Append user departments filter
 * */
$departmentParams = array();
$userDepartments = erLhcoreClassUserDep::parseUserDepartmetnsForFilter($currentUser->getUserID());
if ($userDepartments !== true) {
    $departmentParams['filterin']['id'] = $userDepartments;
    if (!$currentUser->hasAccessTo('lhchat', 'sees_all_online_visitors')) {
        $filter['filterin']['dep_id'] = $userDepartments;
    }
}
if ($is_ajax == true) {
    $items = erLhcoreClassModelChatOnlineUser::getList($filter);
    erLhcoreClassChat::prefillGetAttributes($items, array('online_attr_system_array', 'notes_intro', 'last_check_time_ago', 'visitor_tz_time', 'last_visit_seconds_ago', 'lastactivity_ago', 'time_on_site_front', 'can_view_chat', 'operator_user_send', 'operator_user_string', 'first_visit_front', 'last_visit_front'), array('notes', 'online_attr_system'), array('do_not_clean' => true));
    echo json_encode(array_values($items));
    exit;
}
$tpl->set('departmentParams', $departmentParams);
$tpl->set('tracking_enabled', erLhcoreClassModelChatConfig::fetch('track_online_visitors')->current_value == 1);
$tpl->set('geo_location_data', erLhcoreClassModelChatConfig::fetch('geo_location_data')->data);
$Result['content'] = $tpl->fetch();
$Result['path'] = array(array('title' => erTranslationClassLhTranslation::getInstance()->getTranslation('chat/onlineusers', 'Online visitors')));
erLhcoreClassChatEventDispatcher::getInstance()->dispatch('chat.onlineusers_path', array('result' => &$Result));
$Result['additional_footer_js'] = '<script src="' . erLhcoreClassDesign::designJS('js/angular.lhc.online.min.js') . '"></script>';
开发者ID:niravpatel2008,项目名称:north-american-nemesis-new,代码行数:31,代码来源:onlineusers.php

示例15: fetch

 /**
  * Open, parse, and return the template file.
  *
  * @param $file string the template file name
  */
 function fetch($fileTemplate = null)
 {
     $instance = erLhcoreClassSystem::instance();
     $port = isset($_SERVER['SERVER_PORT']) ? $_SERVER['SERVER_PORT'] : 80;
     if (!$fileTemplate) {
         $fileTemplate = $this->file;
     }
     if ($this->cacheEnabled == true && key_exists(md5($fileTemplate . $instance->WWWDirLang . $instance->Language . $port), $this->cacheTemplates)) {
         try {
             return $this->fetchExecute($this->cacheTemplates[md5($fileTemplate . $instance->WWWDirLang . $instance->Language . $port)]);
         } catch (Exception $e) {
         }
     }
     $cfg = erConfigClassLhConfig::getInstance();
     $file = erLhcoreClassDesign::designtpl($fileTemplate);
     if ($this->templatecompile == true) {
         $contentFile = php_strip_whitespace($file);
         // Compile templates - 3 level of inclusions
         for ($i = 0; $i < 9; $i++) {
             $Matches = array();
             preg_match_all('/<\\?php(\\s*)include_once\\(erLhcoreClassDesign::designtpl\\(\'([a-zA-Z0-9-\\.-\\/\\_]+)\'\\)\\)(.*?)\\?\\>/i', $contentFile, $Matches);
             foreach ($Matches[2] as $key => $Match) {
                 $contentFile = str_replace($Matches[0][$key], php_strip_whitespace(erLhcoreClassDesign::designtpl($Match)), $contentFile);
             }
             //Compile templates inclusions first level.
             $Matches = array();
             preg_match_all('/<\\?php(\\s*)include\\(erLhcoreClassDesign::designtpl\\(\'([a-zA-Z0-9-\\.-\\/\\_]+)\'\\)\\)(.*?)\\?\\>/i', $contentFile, $Matches);
             foreach ($Matches[2] as $key => $Match) {
                 $contentFile = str_replace($Matches[0][$key], php_strip_whitespace(erLhcoreClassDesign::designtpl($Match)), $contentFile);
             }
         }
         //Compile image css paths. Etc..
         $Matches = array();
         preg_match_all('/<\\?php echo erLhcoreClassDesign::design\\(\'([a-zA-Z0-9-\\.-\\/\\_]+)\'\\)(.*?)\\?\\>/i', $contentFile, $Matches);
         foreach ($Matches[1] as $key => $Match) {
             $contentFile = str_replace($Matches[0][$key], erLhcoreClassDesign::design($Match), $contentFile);
         }
         //Compile translations, pure translations
         $Matches = array();
         preg_match_all('/<\\?php echo erTranslationClassLhTranslation::getInstance\\(\\)->getTranslation\\(\'(.*?)\',\'(.*?)\'\\)(.*?)\\?\\>/i', $contentFile, $Matches);
         foreach ($Matches[1] as $key => $TranslateContent) {
             $contentFile = str_replace($Matches[0][$key], erTranslationClassLhTranslation::getInstance()->getTranslation($TranslateContent, $Matches[2][$key]), $contentFile);
         }
         //Translations used in logical conditions
         $Matches = array();
         preg_match_all('/erTranslationClassLhTranslation::getInstance\\(\\)->getTranslation\\(\'(.*?)\',\'(.*?)\'\\)/i', $contentFile, $Matches);
         foreach ($Matches[1] as $key => $TranslateContent) {
             $contentFile = str_replace($Matches[0][$key], '\'' . erTranslationClassLhTranslation::getInstance()->getTranslation($TranslateContent, $Matches[2][$key]) . '\'', $contentFile);
         }
         // Compile url addresses
         $Matches = array();
         preg_match_all('/<\\?php echo erLhcoreClassDesign::baseurl\\((.*?)\\)(.*?)\\?\\>/i', $contentFile, $Matches);
         foreach ($Matches[1] as $key => $UrlAddress) {
             $contentFile = str_replace($Matches[0][$key], erLhcoreClassDesign::baseurl(trim($UrlAddress, '\'')), $contentFile);
         }
         // Compile url direct addresses
         $Matches = array();
         preg_match_all('/<\\?php echo erLhcoreClassDesign::baseurldirect\\((.*?)\\)(.*?)\\?\\>/i', $contentFile, $Matches);
         foreach ($Matches[1] as $key => $UrlAddress) {
             $contentFile = str_replace($Matches[0][$key], erLhcoreClassDesign::baseurldirect(trim($UrlAddress, '\'')), $contentFile);
         }
         // Compile url direct addresses
         $Matches = array();
         preg_match_all('/<\\?php echo erLhcoreClassDesign::baseurlsite\\(\\)(.*?)\\?\\>/i', $contentFile, $Matches);
         foreach ($Matches[1] as $key => $UrlAddress) {
             $contentFile = str_replace($Matches[0][$key], erLhcoreClassDesign::baseurlsite(), $contentFile);
         }
         // Compile css url addresses
         $Matches = array();
         preg_match_all('/<\\?php echo erLhcoreClassDesign::designCSS\\((.*?)\\)(.*?)\\?\\>/i', $contentFile, $Matches);
         foreach ($Matches[1] as $key => $UrlAddress) {
             $contentFile = str_replace($Matches[0][$key], erLhcoreClassDesign::designCSS(trim($UrlAddress, '\'')), $contentFile);
         }
         // Compile css url addresses
         $Matches = array();
         preg_match_all('/<\\?php echo erLhcoreClassDesign::designJS\\((.*?)\\)(.*?)\\?\\>/i', $contentFile, $Matches);
         foreach ($Matches[1] as $key => $UrlAddress) {
             $contentFile = str_replace($Matches[0][$key], erLhcoreClassDesign::designJS(trim($UrlAddress, '\'')), $contentFile);
         }
         // Compile url addresses in logical operations
         $Matches = array();
         preg_match_all('/erLhcoreClassDesign::baseurl\\((.*?)\\)/i', $contentFile, $Matches);
         foreach ($Matches[1] as $key => $UrlAddress) {
             $contentFile = str_replace($Matches[0][$key], '\'' . erLhcoreClassDesign::baseurl(trim($UrlAddress, '\'')) . '\'', $contentFile);
         }
         // Compile url addresses in logical operations
         $Matches = array();
         preg_match_all('/erLhcoreClassDesign::baseurldirect\\((.*?)\\)/i', $contentFile, $Matches);
         foreach ($Matches[1] as $key => $UrlAddress) {
             $contentFile = str_replace($Matches[0][$key], '\'' . erLhcoreClassDesign::baseurldirect(trim($UrlAddress, '\'')) . '\'', $contentFile);
         }
         // Compile config settings, direct output
         $Matches = array();
         preg_match_all('/<\\?php echo erConfigClassLhConfig::getInstance\\(\\)->getSetting\\((\\s?)\'([a-zA-Z0-9-\\.-\\/\\_]+)\'(\\s?),(\\s?)\'([a-zA-Z0-9-\\.-\\/\\_]+)\'(\\s?)\\)(.*?)\\?\\>/i', $contentFile, $Matches);
         foreach ($Matches[1] as $key => $UrlAddress) {
//.........这里部分代码省略.........
开发者ID:mdb-webdev,项目名称:livehelperchat,代码行数:101,代码来源:tpl.php


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