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


PHP erLhcoreClassModelChatOnlineUser::executeRequest方法代码示例

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


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

示例1: removeCustomer

 public static function removeCustomer($instance)
 {
     $cfg = erConfigClassLhConfig::getInstance();
     $secretHash = $cfg->getSetting('site', 'seller_secret_hash');
     $hash = sha1($instance->id . date('Ym') . $secretHash);
     $url = erConfigClassLhConfig::getInstance()->getSetting('site', 'http_mode') . $instance->address . '.' . $cfg->getSetting('site', 'seller_domain') . '/index.php/instance/remove/' . $instance->id . '/' . date('Ym') . '/' . $hash;
     $response = erLhcoreClassModelChatOnlineUser::executeRequest($url);
     $responseData = json_decode($response);
     if (isset($responseData->error) && $responseData->error == false) {
         self::deleteDatabase($instance->id);
         return true;
     } else {
         throw new Exception('Instance removement failed');
     }
 }
开发者ID:jabaxalapa,项目名称:automated-hosting,代码行数:15,代码来源:erlhcoreclassinstance.php

示例2: foreach

<?php

/**
 * Iterates through all instances and executes callback timeout
 * At the moment it's a simple foreach. In the future we may need to enahance this part
 * with some queues etc.
 * 
 * php cron.php -s site_admin -e instance -c cron/extensions_update
 * */
$cfg = erConfigClassLhConfig::getInstance();
$db = ezcDbInstance::get();
foreach (erLhcoreClassModelInstance::getList(array('limit' => 1000000, 'filter' => array('status' => erLhcoreClassModelInstance::WORKING))) as $instance) {
    echo "Executing request to update instance internal structure for extensions - ", $instance->id, "\n";
    $secretHash = $cfg->getSetting('site', 'seller_secret_hash');
    $hash = sha1($instance->id . 'extensions' . date('Ym') . $secretHash);
    if ($instance->full_domain == 1) {
        $url = erConfigClassLhConfig::getInstance()->getSetting('site', 'http_mode') . $instance->address . '/index.php/instance/extensionsstructure/' . $instance->id . '/' . date('Ym') . '/' . $hash;
    } else {
        $url = erConfigClassLhConfig::getInstance()->getSetting('site', 'http_mode') . $instance->address . '.' . $cfg->getSetting('site', 'seller_domain') . '/index.php/instance/extensionsstructure/' . $instance->id . '/' . date('Ym') . '/' . $hash;
    }
    $response = erLhcoreClassModelChatOnlineUser::executeRequest($url);
    echo "Response:\n";
    print_r($response);
    echo PHP_EOL;
}
开发者ID:alisadali,项目名称:automated-hosting,代码行数:25,代码来源:extensions_update.php

示例3: json_encode

<?php

if ((string) $Params['user_parameters_unordered']['action'] == 'statusdb' || (string) $Params['user_parameters_unordered']['action'] == 'statusdbdoupdate') {
    if (!isset($_SERVER['HTTP_X_CSRFTOKEN']) || !$currentUser->validateCSFRToken($_SERVER['HTTP_X_CSRFTOKEN'])) {
        echo json_encode(array('error' => 'true', 'result' => 'Invalid CSRF Token'));
        exit;
    }
    $tpl = erLhcoreClassTemplate::getInstance('lhsystem/update/statusdb.tpl.php');
    $contentData = erLhcoreClassModelChatOnlineUser::executeRequest('https://raw.githubusercontent.com/LiveHelperChat/livehelperchat/master/lhc_web/doc/update_db/structure.json');
    if ((string) $Params['user_parameters_unordered']['action'] == 'statusdbdoupdate') {
        erLhcoreClassUpdate::doTablesUpdate(json_decode($contentData, true));
    }
    $tables = erLhcoreClassUpdate::getTablesStatus(json_decode($contentData, true));
    $tpl->set('tables', $tables);
    echo json_encode(array('result' => $tpl->fetch()));
    exit;
}
$tpl = erLhcoreClassTemplate::getInstance('lhsystem/update.tpl.php');
$Result['content'] = $tpl->fetch();
$Result['path'] = array(array('url' => erLhcoreClassDesign::baseurl('system/configuration'), 'title' => erTranslationClassLhTranslation::getInstance()->getTranslation('system/htmlcode', 'System configuration')), array('title' => erTranslationClassLhTranslation::getInstance()->getTranslation('system/update', 'Live Helper Chat update information')));
开发者ID:nagyistoce,项目名称:livehelperchat,代码行数:20,代码来源:update.php


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