本文整理汇总了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']);
}
}
}
示例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;
示例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;
}
示例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);
}
}