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


PHP vmc::servicelist方法代码示例

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


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

示例1: generate

 /**
  * 订单完成\归档.
  *
  * @param $sdf array 订单ID\操作者ID\操作者名称
  *
  * @return bool - 成功与否
  */
 public function generate($sdf, &$msg = '')
 {
     $mdl_order = app::get('b2c')->model('orders');
     $order_sdf = $mdl_order->dump($sdf['order_id']);
     //订单作废前验证
     foreach (vmc::servicelist('b2c.order.end.finish') as $service) {
         if (!$service->exec($order_sdf, $msg)) {
             return false;
         }
     }
     $order_sdf['status'] = 'finish';
     // 更新退款日志结果
     if ($mdl_order->save($order_sdf)) {
         //订单日志记录
         vmc::singleton('b2c_order_log')->set_operator(array('ident' => $sdf['op_id'] ? $sdf['op_id'] : $order_sdf['member_id'], 'model' => $sdf['op_id'] ? 'shopadmin' : 'members', 'name' => $sdf['op_name'] ? $sdf['op_name'] : '会员'))->set_order_id($order_sdf['order_id'])->success('finish', '订单已完成归档!', $order_sdf);
     } else {
         $msg = '完成\\归档失败!';
         return false;
     }
     //订单作废时同步扩展服务
     foreach (vmc::servicelist('b2c.order.end.finish') as $service) {
         if (!$service->exec($order_sdf, $msg)) {
             //记录日志,不中断
             logger::error($sdf['order_id'] . '完成归档时出错!' . $msg);
         }
     }
     return true;
 }
开发者ID:yindonghai,项目名称:msk.com,代码行数:35,代码来源:end.php

示例2: index

 public function index()
 {
     $desktop_user = vmc::singleton('desktop_user');
     $menus = $desktop_user->get_work_menu();
     $user_id = $this->user->get_id();
     foreach ((array) $menus['workground'] as $key => $value) {
         //if($i++>$workground_count) break;
         $fav_menus[] = $key;
     }
     $this->pagedata['title'] = $title;
     $this->pagedata['title_desc'] = $title_desc;
     $this->pagedata['session_id'] = vmc::singleton('base_session')->sess_id();
     $this->pagedata['uname'] = $this->user->get_login_name();
     $this->pagedata['avatar'] = $this->user->get_avatar();
     $this->pagedata['is_super'] = $this->user->is_super();
     $this->pagedata['param_id'] = $user_id;
     $this->pagedata['menus'] = $menus;
     $this->pagedata['fav_menus'] = (array) $fav_menus;
     $this->pagedata['shop_base'] = vmc::base_url(1);
     $this->pagedata['shopadmin_dir'] = $_SERVER['REQUEST_URI'];
     // 桌面内容替换埋点
     foreach (vmc::servicelist('desktop_content') as $services) {
         if (is_object($services)) {
             if (method_exists($services, 'changeContent')) {
                 $services->changeContent(app::get('desktop'));
                 $services->changeContent($desktop_menu);
             }
         }
     }
     $this->display('index.html');
 }
开发者ID:yindonghai,项目名称:msk.com,代码行数:31,代码来源:default.php

示例3: index

 public function index()
 {
     header('Location:index.php?app=b2c&ctl=admin_setting&act=index');
     die;
     $dashboard_from = $this->_request->get_post('f');
     $dashboard_to = $this->_request->get_post('t');
     $default_enter = true;
     if (!$dashboard_to) {
         $dashboard_to = strtotime(date('Y-m-d'));
     } else {
         $default_enter = false;
     }
     if (!$dashboard_from) {
         $dashboard_from = strtotime('-1 week', $dashboard_to);
     } else {
         $default_enter = false;
     }
     //权限带入
     $user = vmc::singleton('desktop_user');
     $is_super = $user->is_super();
     $group = $user->group();
     $group = (array) $group;
     //统一时间格式
     if (strpos($dashboard_from, ':')) {
         $dashboard_from = strtotime($dashboard_from);
         $dashboard_to = strtotime($dashboard_to);
     }
     if ($dashboard_from > $dashboard_to) {
         $tmp_t = $dashboard_to;
         $dashboard_to = $dashboard_from;
         $dashboard_from = $tmp_t;
     }
     //桌面挂件排序,用户自定义
     if ($default_enter && cacheobject::get('desktop.dashboard.widgets' . $dashboard_to, $cache_data) && isset($cache_data['data'])) {
         $this->pagedata['cached_time'] = $cache_data['cached_time'];
         $widgets = $cache_data['data'];
     } else {
         foreach (vmc::servicelist('desktop.widgets') as $key => $obj) {
             if ($is_super || in_array(get_class($obj), $group)) {
                 $item = array('title' => $obj->get_title(), 'layout' => $obj->get_layout(), 'html' => $obj->get_html($dashboard_from, $dashboard_to), 'order' => $obj->get_order());
                 if (method_exists($obj, 'get_classname')) {
                     $item['classname'] = $obj->get_classname();
                 }
                 $widgets[$item['layout']][] = $item;
             }
         }
         if ($default_enter) {
             $cache_data = array('cached_time' => time(), 'data' => $widgets);
             cacheobject::set('desktop.dashboard.widgets' . $dashboard_to, $cache_data, time() + 86400);
             //缓存24小时
         }
     }
     $this->pagedata['widgets'] = $widgets;
     $this->pagedata['dashboard_from'] = $dashboard_from;
     $this->pagedata['dashboard_to'] = $dashboard_to;
     //快捷
     $this->pagedata['tody'] = date('Y-m-d H:i', strtotime(date('Y-m-d')));
     $this->pagedata['from_arr'] = array('w' => date('Y-m-d H:i', strtotime('-1 week', strtotime($this->pagedata['tody']))), 'm' => date('Y-m-d H:i', strtotime('-1 month', strtotime($this->pagedata['tody']))), 'q' => date('Y-m-d H:i', strtotime('-3 month', strtotime($this->pagedata['tody']))));
     $this->display('dashboard.html');
 }
开发者ID:yindonghai,项目名称:msk.com,代码行数:60,代码来源:dashboard.php

示例4: downgrade

 /**
  * 经验值变更减少,更新会员等级.
  *
  * @param $member_id 会员ID
  * @param $experience 新增经验值
  * @param $msg 错误信息
  */
 public function downgrade($member_id, &$experience, &$msg = '')
 {
     $experience = abs(intval($experience));
     $member = $this->mdl_members->dump($member_id);
     if (!$member) {
         $msg = '参数错误!';
     }
     $exp = $member['experience'] - $experience;
     if ($exp < 0) {
         $exp = 0;
     }
     $experience = $member['experience'] = $exp;
     $is_save = $this->mdl_members->save($member);
     $is_touch = $this->mdl_members->touch_lv($member_id);
     $downgrade_flag = $is_save && $is_touch;
     if ($downgrade_flag) {
         //会员经验值减少成功后执行
         foreach (vmc::servicelist('b2c.member.exp.downgrade') as $object) {
             if (method_exists($object, 'exec')) {
                 $object->exec($member_id);
             }
         }
     }
     return $downgrade_flag;
 }
开发者ID:yindonghai,项目名称:msk.com,代码行数:32,代码来源:exp.php

示例5: index

 public function index()
 {
     $group[] = array('label' => '商品权重', 'data-submit' => 'index.php?app=b2c&ctl=admin_goods&act=batch_edit&p[0]=dorder', 'data-target' => '_ACTION_MODAL_');
     if ($this->has_permission('catgoods')) {
         $group[] = array('label' => '商品分类', 'data-submit' => 'index.php?app=b2c&ctl=admin_goods&act=batch_edit&p[0]=cat', 'data-target' => '_ACTION_MODAL_');
         $group[] = array('label' => '_SPLIT_');
     }
     $group[] = array('label' => 'PC端展示模板', 'data-submit' => 'index.php?app=b2c&ctl=admin_goods&act=batch_edit&p[0]=template', 'data-target' => '_ACTION_MODAL_');
     $group[] = array('label' => 'HTML5触屏端展示模板', 'data-submit' => 'index.php?app=b2c&ctl=admin_goods&act=batch_edit&p[0]=template_m', 'data-target' => '_ACTION_MODAL_');
     foreach (vmc::servicelist('b2c.goods_finder_edit_group') as $object) {
         if (is_object($object) && method_exists($object, 'get_extends_group')) {
             $object->get_extends_group($group);
         }
     }
     if ($this->has_permission('addgoods')) {
         $custom_actions[] = array('label' => '添加商品', 'icon' => 'fa-plus', 'href' => 'index.php?app=b2c&ctl=admin_goods_editor&act=add');
     }
     $custom_actions[] = array('label' => '批量操作', 'group' => $group);
     $actions_base['title'] = '商品列表';
     $actions_base['actions'] = $custom_actions;
     $actions_base['use_buildin_set_tag'] = true;
     $actions_base['use_buildin_filter'] = true;
     if ($this->has_permission('importgoods')) {
         $actions_base['use_buildin_import'] = true;
     }
     if ($this->has_permission('exportgoods')) {
         $actions_base['use_buildin_export'] = true;
     }
     if ($this->has_permission('deletegoods')) {
         $actions_base['use_buildin_recycle'] = true;
     }
     $actions_base['finder_extra_view'] = array(array('app' => 'b2c', 'view' => '/admin/goods/finder/catalog.html'));
     $this->finder('b2c_mdl_goods', $actions_base);
 }
开发者ID:noikiy,项目名称:msk.com,代码行数:34,代码来源:goods.php

示例6: input_element

 public function input_element($type, $params = false)
 {
     if (!self::$inputer) {
         if (vmc::is_online()) {
             self::$inputer = vmc::servicelist('html_input');
         } else {
             self::$inputer = array('base_view_input' => new base_view_input());
         }
     }
     if ($params === false) {
         foreach (self::$inputer as $inputer) {
             $inputer->app = $this->app;
             if (method_exists($inputer, 'input_' . $type)) {
                 return true;
             }
         }
     } else {
         foreach (self::$inputer as $inputer) {
             $inputer->app = $this->app;
             if (method_exists($inputer, 'input_' . $type)) {
                 $html = $inputer->{'input_' . $type}($params);
             }
         }
         return $html;
     }
     return false;
 }
开发者ID:yindonghai,项目名称:msk.com,代码行数:27,代码来源:ui.php

示例7: getTemplateList

 /**
  * 获取模板列表信息
  *
  */
 public function getTemplateList()
 {
     $aResult = array();
     foreach (vmc::servicelist('b2c_promotion_tpl_order_apps') as $object) {
         $aResult[get_class($object)] = array('name' => $object->tpl_name, 'type' => $object->type);
     }
     return $aResult;
 }
开发者ID:yindonghai,项目名称:msk.com,代码行数:12,代码来源:process.php

示例8: get_sender_list

 /**
  * 获得消息发送器列表
  */
 public function get_sender_list()
 {
     $sender_list = array();
     foreach (vmc::servicelist('b2c_messenger_sender') as $key => $v) {
         $sender_list[$key] = (array) $v;
         $sender_list[$key]['methods'] = get_class_methods($v);
     }
     return $sender_list;
 }
开发者ID:noikiy,项目名称:snk.com,代码行数:12,代码来源:stage.php

示例9: work

 public function work($full_object_name)
 {
     $this->url = 'index.php?';
     vmc_('desktop', 'finder_make_get');
     $query = utils::http_build_query($_GET);
     $this->url = $this->url . $query;
     $this->object_name = $full_object_name;
     list($object_app, $object_name) = vmc_('desktop', 'finder_split_model', $full_object_name);
     $service_list = array();
     foreach (vmc::servicelist('desktop_finder.' . $this->object_name) as $name => $object) {
         $service_list[$name] = $object;
     }
     foreach (vmc::servicelist('desktop_finder.' . $this->object_name . '.' . $this->finder_aliasname) as $name => $object) {
         $service_list[$name] = $object;
     }
     foreach ($service_list as $name => $object) {
         $tmpobj = $object;
         foreach (get_class_methods($tmpobj) as $method) {
             switch (substr($method, 0, 7)) {
                 case 'column_':
                     $this->addon_columns[] = array(&$tmpobj, $method);
                     break;
                 case 'detail_':
                     if (!$this->object_select_model) {
                         $this->detail_pages[$method] = array(&$tmpobj, $method);
                     }
                     break;
             }
         }
         $this->service_object[] =& $tmpobj;
         if (method_exists($tmpobj, 'row_style')) {
             $this->row_style_func[] =& $tmpobj;
         }
         unset($tmpobj);
         $i++;
     }
     /*
      * 对额外添加的column和detail的修改
      */
     $obj_addon_cols = vmc::servicelist('desktop_finder_column_modifier.' . $this->object_name . '.' . $this->finder_aliasname);
     if ($obj_addon_cols) {
         foreach ($obj_addon_cols as $obj) {
             $obj->columns_modifier($this->addon_columns);
         }
     }
     $obj_addon_detail_cols = vmc::servicelist('desktop_finder_detail_modifier.' . $this->object_name . '.' . $this->finder_aliasname);
     if ($obj_addon_detail_cols) {
         foreach ($obj_addon_detail_cols as $obj) {
             $obj->detail_columns_modifier($this->detail_pages);
         }
     }
     /* end **/
     $this->object = app::get($object_app)->model($object_name);
     $this->has_tag = $this->object->has_tag;
     $this->dbschema = $this->object->schema;
     $this->main();
 }
开发者ID:yindonghai,项目名称:msk.com,代码行数:57,代码来源:prototype.php

示例10: loginlimit

 /**
  * loginlimit-登录受限检测
  *
  * @param      none
  * @return     void
  */
 function loginlimit($mid, &$redirect)
 {
     $services = vmc::servicelist('loginlimit.check');
     if ($services) {
         foreach ($services as $service) {
             $redirect = $service->checklogin($mid);
         }
     }
     return $redirect ? true : false;
 }
开发者ID:noikiy,项目名称:msk.com,代码行数:16,代码来源:frontpage.php

示例11: function_SYSTEM_FOOTER_M

 public function function_SYSTEM_FOOTER_M($params, &$smarty)
 {
     $html = $smarty->fetch('footer.html', app::get('mobile')->app_id);
     $services = vmc::servicelist('mobile_view_helper');
     foreach ($services as $service) {
         if (method_exists($service, 'function_SYSTEM_FOOTER_M')) {
             $html .= $service->function_SYSTEM_FOOTER_M($params, $smarty);
         }
     }
     return $html;
 }
开发者ID:yindonghai,项目名称:msk.com,代码行数:11,代码来源:helper.php

示例12: insert

 /**
  * 重写insert方法
  * @param mixed 需要插入记录的数组
  * @return boolean
  */
 public function insert(&$data)
 {
     $is_inserted = parent::insert($data);
     if ($is_inserted) {
         $obj_extends_service = vmc::servicelist('b2c.api_sales_rule_goods_extends_actions');
         if ($obj_extends_service) {
             foreach ($obj_extends_service as $obj) {
                 $obj->extend_insert($data);
             }
         }
     }
     return $is_inserted;
 }
开发者ID:yindonghai,项目名称:msk.com,代码行数:18,代码来源:goods.php

示例13: _init_attribute

 protected function _init_attribute()
 {
     if (is_null($this->_aAttribute)) {
         $aResult = array();
         foreach (vmc::servicelist($this->attribute_apps) as $object) {
             if (!is_object($object)) {
                 continue;
             }
             $aResult = array_merge($aResult, $object->getItem());
         }
         $this->_aAttribute = $aResult;
     }
 }
开发者ID:yindonghai,项目名称:msk.com,代码行数:13,代码来源:aggregator.php

示例14: _cart_count

 private function _cart_count(&$cart_result)
 {
     //初始化购物车小计项
     $amount_arr = array('consume_score' => 0, 'gain_score' => 0, 'goods_count' => 0, 'object_count' => 0, 'weight' => 0, 'cart_amount' => 0.0, 'member_discount_amount' => 0.0, 'order_promotion_discount_amount' => 0.0, 'goods_promotion_discount_amount' => 0.0, 'promotion_discount_amount' => 0.0, 'finally_cart_amount' => 0.0);
     $cart_result = array_merge($cart_result, $amount_arr);
     foreach (vmc::servicelist('b2c_cart_object_apps') as $object) {
         if (!is_object($object)) {
             continue;
         }
         $object->count($cart_result);
         //$cart_result 引用传递
     }
 }
开发者ID:yindonghai,项目名称:msk.com,代码行数:13,代码来源:get.php

示例15: process

 public function process($filter, &$cart_result = array(), $config = array())
 {
     // servicelist('b2c_cart_prefilter_apps')=>
     // b2c_cart_prefilter_promotion_goods
     //商品促销过滤计算
     foreach (vmc::servicelist('b2c_cart_prefilter_apps') as $object) {
         if (!is_object($object)) {
             continue;
         }
         $object->filter($cart_result, $config);
         //$cart_result 引用传递
     }
 }
开发者ID:yindonghai,项目名称:msk.com,代码行数:13,代码来源:prefilter.php


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