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


PHP Service::getInstance方法代码示例

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


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

示例1: scanTask

 public function scanTask($serv, $task_id, $from_id, $data)
 {
     global $admin_id;
     $task_list = get_url('list', $admin_id);
     foreach ($task_list as $_task_id => $_task_info) {
         if (!empty($_task_info['stop'])) {
             //进库
             Service::getInstance()->scanResult($_task_id, $_task_info['url']);
         }
     }
 }
开发者ID:hackers365,项目名称:mitm_inline,代码行数:11,代码来源:server.php

示例2: Savant3

<?php

include 'class/includes.php';
$view = new Savant3();
$service = Service::getInstance();
$view->setPath('template', array(TPL_PATH));
if (isset($_POST['search_term']) && chkid($_POST['city_id'])) {
    //TODO avoid search if term is empty(?)
    $search_term = htmlentities(text_only(trim($_POST['search_term'])), ENT_QUOTES, CONF_ENC);
    if ($search_term == LANG_SEARCH_TEXT) {
        $search_term = '';
    } else {
        //TODO check for other criteria and if none dispaly message - no search term
    }
    $view->search_term = $search_term;
    $search_term = mb_strtoupper($search_term, CONF_ENC);
    $city_id = $_POST['city_id'];
    if (chkid($_POST['cat_id'])) {
        $cat_id = $_POST['cat_id'];
        $field_list = $service->get_searchable_field_list($cat_id);
        if (count($field_list) > 0) {
            foreach ($field_list as $key => $value) {
                switch ($value['type']) {
                    case TYPE_NUMBER:
                        if (isset($_POST[$value['name'] . TYPE_NUMBER_FROM]) && ctype_digit($_POST[$value['name'] . TYPE_NUMBER_FROM]) && $_POST[$value['name'] . TYPE_NUMBER_FROM] >= 0) {
                            $field_list[$key]['from'] = text_only($_POST[$value['name'] . TYPE_NUMBER_FROM]);
                        }
                        if (isset($_POST[$value['name'] . TYPE_NUMBER_TO]) && ctype_digit($_POST[$value['name'] . TYPE_NUMBER_TO]) && $_POST[$value['name'] . TYPE_NUMBER_TO] >= 0) {
                            $field_list[$key]['to'] = text_only($_POST[$value['name'] . TYPE_NUMBER_TO]);
                        }
                        break;
开发者ID:renztoygwapo,项目名称:openlist,代码行数:31,代码来源:search.php

示例3: TerminateOverdueOrders

 public function TerminateOverdueOrders()
 {
     $setting = Settings::getInstance();
     $service = Service::getInstance();
     $time = Time::getInstance();
     $retarray = array();
     $days = $time->UtoM(time());
     $this->raw = $this->db->fetch_all_array('SELECT * FROM `Order` WHERE `status` = "Suspended" AND `nextdue` < "' . $days . '" AND `cycle` > 0');
     for ($i = 0; $i < count($this->raw); $i++) {
         if ($time->diff_dates($days, $this->raw[$i]['nextdue'], 'D') > 14) {
             if ($service->Terminate($this->raw[$i]['id'])) {
                 $retarray[$this->raw[$i]['id']] = "1";
             } else {
                 $retarray[$this->raw[$i]['id']] = "0";
             }
         }
     }
     return $retarray;
 }
开发者ID:carriercomm,项目名称:Multicabinet,代码行数:19,代码来源:class.Order.php

示例4: do_crea_respuesta_cerrada

 function do_crea_respuesta_cerrada()
 {
     $user = Session::get_user();
     if ($user != null && $user->getVerified()) {
         $service = Service::getInstance();
         return json_encode($service->do_crea_respuesta_cerrada($this));
     } else {
         header("Location: ?ID=login");
         exit(0);
     }
 }
开发者ID:exildev,项目名称:q-stad,代码行数:11,代码来源:Package1.php


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