當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。