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


PHP kernel::servicelist方法代码示例

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


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

示例1: main

 function main()
 {
     $oIo = kernel::servicelist('desktop_io');
     foreach ($oIo as $aIo) {
         if ($aIo->io_type_name == substr($_FILES['import_file']['name'], -3)) {
             $oImportType = $aIo;
             break;
         }
     }
     unset($oIo);
     $handle = fopen($_FILES['import_file']['tmp_name'], "r");
     $line = 0;
     $saveData = array();
     $appId = $this->app->app_id;
     $mdl = substr($this->object_name, strlen($this->app->app_id . '_mdl_'));
     $oImportType->prepared_import($appId, $mdl);
     while ($contents = $oImportType->fgethandle($handle)) {
         $return = $oImportType->import($contents, $appId, $mdl);
         if ($return['0'] == 'failure') {
             header("content-type:text/html; charset=utf-8");
             echo "<script>alert(\"上传失败\\n失败原因:" . $return[1]['error'] . "\")</script>";
             exit;
         }
         $line++;
     }
     $oImportType->finish_import();
     fclose($handle);
     echo "<script>alert(\"上传成功 已加入队列 系统会自动跑完队列" . ($return[1]['warning'] ? "但是存在如下问题 \\n" . implode("\\n", array_keys($return[1]['warning'])) : '') . "\")</script>";
 }
开发者ID:dalinhuang,项目名称:shopexts,代码行数:29,代码来源:import.php

示例2: result

 function result()
 {
     $this->set_no_store();
     $oSearch =& $this->app->model('search');
     $emu_static = $this->app->getConf('system.seo.emuStatic');
     foreach (kernel::servicelist("search.prepare") as $obj) {
         $obj->parse($_POST);
     }
     $cat_id = $_POST['cat_id'];
     unset($_POST['cat_id']);
     foreach ($_POST as $k => $v) {
         if ($k == "name" && $_POST[$k][0]) {
             $_POST[$k][0] = str_replace('_', '%xia%', $_POST[$k][0]);
             $_POST[$k][0] = strip_tags($_POST[$k][0]);
         }
         if ($k == "price" && $_POST[$k][1]) {
             $_POST[$k][0] = floatval($_POST[$k][0]);
             $_POST[$k][1] = floatval($_POST[$k][1]);
         }
     }
     if (isset($_POST['filter']) && ($filter = $oSearch->decode($_POST['filter'], $path))) {
         $filter = array_merge($filter, $_POST);
     } else {
         $filter = $_POST;
     }
     unset($_POST['filter']);
     $filter = $oSearch->encode($filter);
     if (empty($cat_id) && empty($filter)) {
         $args = null;
     } else {
         $args = array($cat_id, $filter);
     }
     $this->sredirect(array('app' => 'b2c', 'ctl' => 'site_gallery', 'act' => 'index', 'args' => $args));
 }
开发者ID:syjzwjj,项目名称:quyeba,代码行数:34,代码来源:search.php

示例3: exec

 public function exec($params = null)
 {
     // 与中心交互
     $is_need_rpc = false;
     $obj_rpc_obj_rpc_request_service = kernel::servicelist('b2c.rpc_notify_request');
     foreach ($obj_rpc_obj_rpc_request_service as $obj) {
         if ($obj && method_exists($obj, 'rpc_judge_send')) {
             if ($obj instanceof b2c_api_rpc_notify_interface) {
                 $is_need_rpc = $obj->rpc_judge_send($params);
             }
         }
         if ($is_need_rpc) {
             break;
         }
     }
     if ($is_need_rpc) {
         /*$obj_rpc_request_service = kernel::service('b2c.rpc.send.request');
         
         			if ($obj_rpc_request_service && method_exists($obj_rpc_request_service, 'rpc_caller_request'))
         			{
         				if ($obj_rpc_request_service instanceof b2c_api_rpc_request_interface)
         					$obj_rpc_request_service->rpc_caller_request($params,'create');
         			}
         			else
         			{
         				$obj_order_create = kernel::single('b2c_order_rpc_recaller');
         				$obj_order_create->rpc_caller_request($params);
                         }*/
         //新的版本控制api
         $obj_apiv = kernel::single('b2c_apiv_exchanges_request');
         $obj_apiv->rpc_caller_request($params, 'ordercreate');
     }
 }
开发者ID:sss201413,项目名称:ecstore,代码行数:33,代码来源:sendorders.php

示例4: trigger

 function trigger()
 {
     set_time_limit(0);
     ignore_user_abort(1);
     //检查计划任务有没有增减
     $status = $this->status();
     $service = (array) kernel::servicelist('autotask');
     $servicelist = array_values($service['iterator']->getArrayCopy());
     $exists_class = array_keys($status);
     $diff_class = array_diff($servicelist, $exists_class);
     $add = $delete = array();
     foreach ($diff_class as $class_name) {
         if (in_array($class_name, $exists_class)) {
             //app::get('base')->model('task')->delete('task'=>$class_name);
         } else {
             $class = new $class_name();
             if ($class instanceof base_interface_task) {
                 $data = array('task' => $class_name, 'description' => $class->description(), 'rule' => $class->rule(), 'last' => time());
                 app::get('base')->model('task')->insert($data);
             }
         }
     }
     //根据规则执行计划任务
     $status = $this->status();
     $now = time();
     foreach ($status as $cron) {
         if ($cron['enabled'] && $now >= base_crontabparser::parse($cron['rule'], $cron['last'])) {
             $cron_class = new $cron['task']();
             $cron_class->exec();
             app::get('base')->model('task')->update(array('last' => $now), array('task' => $cron['task']));
             kernel::log('crontab ' . $cron['task'] . ' run at ' . date('Y-m-d H:m:i', $now));
         }
     }
 }
开发者ID:syjzwjj,项目名称:quyeba,代码行数:34,代码来源:autotask.php

示例5: _cart_process

 private function _cart_process($aData, &$aResult, $aConfig)
 {
     foreach (kernel::servicelist('b2c_cart_object_apps') as $object) {
         if (!is_object($object)) {
             continue;
         }
         if (method_exists($object, 'get_order')) {
             $index = $object->get_order();
         } else {
             $index = 10;
         }
         while (true) {
             if (!isset($tmp[$index])) {
                 break;
             }
             $index++;
         }
         $tmp[$index] = $object;
     }
     krsort($tmp);
     foreach ($tmp as $object) {
         if (method_exists($object, 'get_type')) {
             $type_name = $object->get_type();
         } else {
             $type_name = array_pop(explode('_', get_class($object)));
         }
         // 购物车项类型
         $aResult['object'][$type_name] = $object->getAll(true);
     }
 }
开发者ID:syjzwjj,项目名称:quyeba,代码行数:30,代码来源:get.php

示例6: get_all

 /**
  * 获取所有开启(激活)的支付方式
  * @param mixed 过滤条件
  * @return array 支付方式数组
  */
 public function get_all($sdf)
 {
     $arr_payments = array();
     $obj_payments_service_all = kernel::servicelist('ectools_payment.ectools_mdl_payment_cfgs');
     foreach ($obj_payments_service_all as $obj) {
         switch ($obj->app_key) {
             case 'offline':
                 $payout_type = 'offline';
                 break;
             case 'offlinemeitong':
                 $payout_type = 'offline';
                 break;
             case 'offlinecard':
                 $payout_type = 'offline';
                 break;
             case 'deposit':
                 $payout_type = 'deposit';
                 break;
             default:
                 $payout_type = 'online';
                 break;
         }
         $strPayment = $this->app->getConf(get_class($obj));
         $arrPaymnet = unserialize($strPayment);
         if (isset($arrPaymnet['status']) && $arrPaymnet['status'] == 'true') {
             $arr_payments[$obj->app_key] = array('payout_type' => $payout_type, 'payment_name' => isset($arrPaymnet['setting']['pay_name']) && $arrPaymnet['setting']['pay_name'] ? $arrPaymnet['setting']['pay_name'] : $obj->display_name, 'payment_id' => isset($obj->app_rpc_key) && $obj->app_rpc_key ? $obj->app_rpc_key : $obj->app_key);
         }
     }
     return $arr_payments;
 }
开发者ID:noikiy,项目名称:Ecstore-to-odoo,代码行数:35,代码来源:payment.php

示例7: input_goodsfilter

 function input_goodsfilter($params)
 {
     $render = new base_render(app::get('b2c'));
     $obj_type = app::get('b2c')->model('goods_type');
     $input_name = $params['name'];
     parse_str($params['value'], $value);
     $params = array('gtype' => $obj_type->getList('*', null, 0, -1), 'view' => 'admin/goods/finder_filter.html', 'params' => $params['params'], 'json' => json_encode($data), 'data' => $value, 'from' => $params['value'], 'domid' => substr(md5(rand(0, time())), 0, 6), 'name' => $input_name);
     $type_id = '_ANY_';
     $params['value'] = $value;
     if ($params['value']['type_id']) {
         $type_id = $params['value']['type_id'];
     }
     $render->pagedata['params'] = $params;
     $goods_filter = kernel::single('b2c_goods_goodsfilter');
     $return = $goods_filter->goods_goodsfilter($type_id, app::get('b2c'));
     $render->pagedata['filter'] = $return;
     $render->pagedata['type_id'] = $type_id;
     $render->pagedata['filter_items'] = array();
     foreach (kernel::servicelist('goods_filter_item') as $key => $object) {
         if (is_object($object) && method_exists($object, 'get_item_html')) {
             $render->pagedata['filter_items'][] = $object->get_item_html();
         }
     }
     return $render->fetch('admin/goods/goods_filter.html');
 }
开发者ID:syjzwjj,项目名称:quyeba,代码行数:25,代码来源:input.php

示例8: generate

 /**
  * 创建退款单
  * @params array - 订单数据
  * @params obj - 应用对象
  * @params string - 支付单生成的记录
  * @return boolean - 创建成功与否
  */
 public function generate(&$sdf, &$controller = null, &$msg = '')
 {
     // 异常处理
     if (!isset($sdf) || !$sdf || !is_array($sdf)) {
         trigger_error(app::get('ectools')->_("退款单信息不能为空!"), E_USER_ERROR);
         exit;
     }
     $is_save = false;
     // 保存的接口方法
     $obj_refund_create = kernel::single("ectools_refund_create");
     $is_save = $obj_refund_create->generate($sdf);
     if (!$is_save) {
         $msg = app::get('ectools')->_('退款单生成失败!');
         return false;
     }
     $obj_refund_special = kernel::servicelist('ectools_refund.ectools_mdl_special_refund');
     foreach ($obj_refund_special as $obj_app) {
         $is_save = $obj_app->dorefund($sdf);
     }
     if ($is_save) {
         $obj_api_refund = kernel::single("ectools_refund_update");
         $sdf['status'] = 'succ';
         $is_save = $obj_api_refund->generate($sdf);
         if (!$is_save) {
             $msg = app::get('ectools')->_('退款单编辑失败!');
             return false;
         }
     }
     return $is_save;
 }
开发者ID:syjzwjj,项目名称:quyeba,代码行数:37,代码来源:refund.php

示例9: detail_basic

 function detail_basic($member_id)
 {
     $app = app::get('b2c');
     $userObject = kernel::single('b2c_user_object');
     $member_model = $this->app->model('members');
     $a_mem = $member_model->dump($member_id);
     $accountData = $userObject->get_members_data(array('account' => 'login_account'), $member_id);
     $a_mem['contact']['name'] = $accountData['account']['local'];
     $a_mem['contact']['email'] = $accountData['account']['email'];
     $a_mem['contact']['phone']['mobile'] = $accountData['account']['mobile'];
     $obj_extend_point = kernel::service('b2c.member_extend_point_info');
     if ($obj_extend_point) {
         // 当前会员拥有的积分
         $obj_extend_point->get_real_point($member_id, $a_mem['score']['total']);
         // 当前会员实际可以使用的积分
         $obj_extend_point->get_usage_point($member_id, $a_mem['score']['usage']);
     }
     $userPassport = kernel::single('b2c_user_passport');
     $render = $app->render();
     $render->pagedata['attr'] = $userPassport->get_signup_attr($member_id);
     $render->pagedata['mem'] = $a_mem;
     $render->pagedata['member_id'] = $member_id;
     // 判断是否使用了推广服务
     $is_bklinks = 'false';
     $obj_input_helpers = kernel::servicelist("html_input");
     if (isset($obj_input_helpers) && $obj_input_helpers) {
         foreach ($obj_input_helpers as $obj_bdlink_input_helper) {
             if (get_class($obj_bdlink_input_helper) == 'bdlink_input_helper') {
                 $is_bklinks = 'true';
             }
         }
     }
     $render->pagedata['is_bklinks'] = $is_bklinks;
     return $render->fetch('admin/member/detail.html');
 }
开发者ID:noikiy,项目名称:Ecstore-to-odoo,代码行数:35,代码来源:members.php

示例10: exec

 public function exec($params = null)
 {
     // 与中心交互
     $is_need_rpc = false;
     $obj_rpc_obj_rpc_request_service = kernel::servicelist('b2c.rpc_notify_request');
     foreach ($obj_rpc_obj_rpc_request_service as $obj) {
         if ($obj && method_exists($obj, 'rpc_judge_send')) {
             if ($obj instanceof b2c_api_rpc_notify_interface) {
                 $is_need_rpc = $obj->rpc_judge_send($sdf_order);
             }
         }
         if ($is_need_rpc) {
             break;
         }
     }
     //取消订单支付是否实时同步在后台的设置
     //if (app::get('b2c')->getConf('site.order.send_type') == 'false' && $is_need_rpc)
     if ($is_need_rpc) {
         /*$obj_rpc_request_service = kernel::service('b2c.rpc.send.request');
         
         			if ($obj_rpc_request_service && method_exists($obj_rpc_request_service, 'rpc_caller_request'))
         			{
         				if ($obj_rpc_request_service instanceof b2c_api_rpc_request_interface)
         					$obj_rpc_request_service->rpc_caller_request($params,'pay');
         			}
         			else
         			{
         				$obj_order_create = kernel::single('b2c_order_rpc_pay');
         				$obj_order_create->rpc_caller_request($params);
                         }*/
         //新的版本控制api
         $obj_apiv = kernel::single('b2c_apiv_exchanges_request');
         $obj_apiv->rpc_caller_request($params, 'orderpay');
     }
 }
开发者ID:sss201413,项目名称:ecstore,代码行数:35,代码来源:sendpayments.php

示例11: initExtendsColumnAndDetail

 /**
  * 初始化扩展列和detail
  *
  * @return void
  */
 protected function initExtendsColumnAndDetail()
 {
     $service_list = array();
     foreach (kernel::servicelist('desktop_finder.' . $this->object_name) as $name => $object) {
         $service_list[$name] = $object;
     }
     foreach (kernel::servicelist('desktop_finder.' . $this->object_name . '.' . $this->finder_aliasname) as $name => $object) {
         $service_list[$name] = $object;
     }
     foreach ($service_list as $name => $object) {
         foreach (get_class_methods($object) as $method) {
             switch (substr($method, 0, 7)) {
                 case 'column_':
                     $this->addon_columns[] = array($object, $method);
                     break;
                 case 'detail_':
                     if (!$this->alertpage_finder) {
                         //如果是弹出页finder, 则去掉详细查看按钮
                         $this->detail_pages[$method] = array($object, $method);
                     }
                     break;
             }
         }
         $this->service_object[] = $object;
     }
 }
开发者ID:453111208,项目名称:bbc,代码行数:31,代码来源:prototype.php

示例12: recover

 function recover()
 {
     kernel::single('base_session')->close();
     set_time_limit(0);
     $filename = $_GET['file'];
     $fileid = intval($_GET['fileid']) ? intval($_GET['fileid']) : 1;
     $vols = $_GET['vols'] ? $_GET['vols'] : 1;
     $oDSB = kernel::single("desktop_system_backup");
     $app = $_GET['appid'];
     //备份中的app
     //$objB2c = app::get('b2c');
     //$objB2c->setConf('member.attr','');
     // $attr_model = $objB2c->model('member_attr')->init();
     $oDSB->recover($filename, $vols, $fileid, $app);
     //exit;
     if ($vols <= $fileid) {
         ob_start();
         kernel::single('base_shell_loader')->exec_command('kvrecovery');
         //还原kvstore
         ob_end_clean();
         foreach (kernel::servicelist('restore_firevent') as $k => $firevent) {
             if (is_object($firevent)) {
                 $firevent->restoreEvent();
             }
         }
         echo '{success:"' . app::get('desktop')->_('恢复完成') . '"}';
     } else {
         echo '{message:"' . $oDSB->show_message . app::get('desktop')->_('正在恢复第') . ($fileid + 1) . app::get('desktop')->_('卷 共') . $vols . '' . app::get('desktop')->_('卷') . '",               nexturl:"index.php?app=desktop&ctl=comeback&act=recover&file=' . $filename . '&vols=' . $vols . '&fileid=' . ($fileid + 1) . '&appid=' . $app . '"}';
     }
 }
开发者ID:syjzwjj,项目名称:quyeba,代码行数:30,代码来源:comeback.php

示例13: do_payment

 public function do_payment($payment, &$msg)
 {
     $obj_pay_lists = kernel::servicelist("order.pay_finish");
     //$obj_pay = kernel::single("ectools_pay");
     $is_payed = 'succ';
     foreach ($obj_pay_lists as $order_pay_service_object) {
         $class_name = get_class($order_pay_service_object);
         if (strpos($class_name, $this->app->app_id . '_') !== false) {
             $objAdvance = $this->app->model('member_advance');
             if ($payment['op_id']) {
                 if (!$objAdvance->check_account($payment['op_id'], $msg, $payment['cur_money'])) {
                     $is_payed = 'failed';
                     return false;
                 }
             } else {
                 $is_payed = 'failed';
                 return false;
             }
             //$obj_api_payment = kernel::service("api.ectools.payment");
             $obj_payment_update = kernel::single('ectools_payment_update');
             $payment['status'] = 'succ';
             $obj_payment_update->generate($payment, $msg);
             //$obj_pay->pay_finish($payment, $is_payed);
             $is_payed = $order_pay_service_object->order_pay_finish($payment, 'succ', 'font');
             return $is_payed;
         }
     }
     return false;
 }
开发者ID:dalinhuang,项目名称:shopexts,代码行数:29,代码来源:deposit.php

示例14: login

 function login($params)
 {
     $auth = pam_auth::instance($params['type']);
     if ($params['module']) {
         if ($passport_module = kernel::single($params['module'])) {
             if ($passport_module instanceof pam_interface_passport) {
                 $module_uid = $passport_module->login($auth, $auth_data);
                 if ($module_uid) {
                     $auth->account()->update($params['module'], $module_uid, $auth_data);
                 }
                 $log = array('event_time' => time(), 'event_type' => $auth->type, 'event_data' => $auth_data['log_data']);
                 app::get('pam')->model('log')->insert($log);
                 $_SESSION['last_error'] = $auth_data['log_data'];
                 $_SESSION['type'] = $auth->type;
                 $_SESSION['login_time'] = time();
                 $url = '';
                 if ($params['mini']) {
                     $url = '?mini=1';
                 }
                 /**
                  * appעļ
                  */
                 $params['member_id'] = $module_uid;
                 $params['uname'] = $_POST['uname'];
                 foreach (kernel::servicelist('pam_login_listener') as $service) {
                     $service->listener_login($params);
                 }
                 header('Location:' . base64_decode(urldecode($params['redirect'])) . $url);
             }
         } else {
         }
     }
 }
开发者ID:dalinhuang,项目名称:shopexts,代码行数:33,代码来源:callback.php

示例15: filter

 public function filter(&$aResult, $aConfig)
 {
     // 没有商品数据
     if (empty($aResult['object']['goods'])) {
         return false;
     }
     if (!isset($aConfig['promotion']['goods'])) {
         //购物车的时候
         $aGoodsId = array();
         foreach ($aResult['object']['goods'] as $row) {
             if (empty($row['obj_items']['products']['0']['goods_id'])) {
                 continue;
             }
             $gid = $row['obj_items']['products']['0']['goods_id'];
             //验证是否参与促销 false:不参与
             foreach (kernel::servicelist("b2c_promotion_use_check") as $object) {
                 if (!$object->check_use_promotion($gid)) {
                     continue 2;
                 }
             }
             $aGoodsId[] = $gid;
         }
         $aConfig = $this->_init_rule(array_unique($aGoodsId), array('current_time' => time()));
     } else {
         $aConfig = $aConfig['promotion']['goods'];
     }
     $this->_filter($aResult, $aConfig);
 }
开发者ID:syjzwjj,项目名称:quyeba,代码行数:28,代码来源:goods.php


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