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


PHP kernel::get_app_statics_host_url方法代码示例

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


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

示例1: initFileContents

 public function initFileContents()
 {
     $staticsHostUrl = kernel::get_app_statics_host_url();
     $fileDir = $staticsHostUrl . '/ectools/statics/scripts/area.json';
     $this->areaFileContents = json_decode(file_get_contents($fileDir), true);
     $this->__setKvArea();
 }
开发者ID:453111208,项目名称:bbc,代码行数:7,代码来源:area.php

示例2: __construct

 function __construct($app_id)
 {
     $this->app_id = $app_id;
     $this->app_dir = APP_DIR . '/' . $app_id;
     $this->public_app_dir = PUBLIC_DIR . '/app/' . $app_id;
     $this->res_url = kernel::get_app_statics_host_url() . '/' . $app_id . '/statics';
     $this->res_full_url = kernel::get_app_statics_host_url() . '/' . $app_id . '/statics';
     $this->lang_url = kernel::get_app_statics_host_url() . '/' . $app_id . '/lang';
     $this->lang_full_url = kernel::get_app_statics_host_url() . '/' . $app_id . '/lang';
     $this->widgets_url = kernel::get_app_statics_host_url() . '/' . $app_id . '/widgets';
     $this->widgets_full_url = kernel::get_app_statics_host_url() . '/' . $app_id . '/widgets';
     $this->res_dir = PUBLIC_DIR . '/app/' . $app_id . '/statics';
     $this->widgets_dir = PUBLIC_DIR . '/app/' . $app_id . '/widgets';
     $this->lang_dir = PUBLIC_DIR . '/app/' . $app_id . '/lang';
     //$this->lang_resource = lang::get_res($app_id);  //todo: 得到语言包资源文件结构
     $this->_lang_resource = null;
 }
开发者ID:noikiy,项目名称:Ecstore-to-odoo,代码行数:17,代码来源:app.php

示例3: add_widgets_page_extend

 public function add_widgets_page_extend()
 {
     $theme = $this->_request->get_get('theme');
     $type = $this->_request->get_get('type');
     $catalog = $this->_request->get_post('catalog');
     $this->pagedata['theme'] = $theme;
     $this->pagedata['widgetsLib'] = kernel::single('site_theme_widget')->get_libs_extend($theme, $catalog);
     $app_base_url = kernel::get_app_statics_host_url();
     $theme_url = kernel::get_themes_host_url() . '/' . $theme;
     $themesFileObj = app::get('site')->model('themes_file');
     // $widgetsFileObj=app::get('site')->model('widgets_file');
     $storager = kernel::single('base_storager');
     if ($this->pagedata['widgetsLib']['list']) {
         foreach ((array) $this->pagedata['widgetsLib']['list'] as $key => $widgets) {
             if ($widgets['theme']) {
                 $rs = $themesFileObj->getList('content', array('fileuri' => $widgets['theme'] . ':' . 'widgets/' . $widgets['name'] . '/images/icon.jpg'));
                 if ($rs[0]['content']) {
                     $ident = $storager->parse($rs[0]['content']);
                     $src = $ident['url'];
                     ecae_kvstore_write('test', $src);
                     $this->pagedata['widgetsLib']['list'][$key]['img'] = $src;
                 } else {
                     if (file_exists(THEME_DIR . '/' . $theme . '/widgets/' . $widgets['name'] . '/images/icon.jpg')) {
                         $this->pagedata['widgetsLib']['list'][$key]['img'] = $theme_url . '/widgets/' . $widgets['name'] . '/images/icon.jpg';
                     } else {
                         $this->pagedata['widgetsLib']['list'][$key]['img'] = $this->app->res_url . '/images/widgets/icon.jpg';
                     }
                 }
                 $rs = $themesFileObj->getList('content', array('fileuri' => $widgets['theme'] . ':' . 'widgets/' . $widgets['name'] . '/images/widget.jpg'));
                 if ($rs[0]['content']) {
                     $ident = $storager->parse($rs[0]['content']);
                     $src = $ident['url'];
                     $this->pagedata['widgetsLib']['list'][$key]['bimg'] = $src;
                 } else {
                     if (file_exists(THEME_DIR . '/' . $theme . '/widgets/' . $widgets['name'] . '/images/preview.jpg')) {
                         $this->pagedata['widgetsLib']['list'][$key]['bimg'] = $theme_url . '/widgets/' . $widgets['name'] . '/images/preview.jpg';
                     } else {
                         $this->pagedata['widgetsLib']['list'][$key]['bimg'] = $this->app->res_url . '/images/widgets/widget.jpg';
                     }
                 }
             } else {
                 //获取系统级挂件信息
                 if (file_exists(ROOT_DIR . '/app/' . $widgets['app'] . '/widgets/' . $widgets['name'] . '/images/icon.jpg')) {
                     $this->pagedata['widgetsLib']['list'][$key]['img'] = $app_base_url . $widgets['app'] . '/widgets/' . $widgets['name'] . '/images/icon.jpg';
                 } else {
                     $this->pagedata['widgetsLib']['list'][$key]['img'] = $this->app->res_url . '/images/widgets/icon.jpg';
                 }
                 if (file_exists(ROOT_DIR . '/app/' . $widgets['app'] . '/widgets/' . $widgets['name'] . '/images/preview.jpg')) {
                     $this->pagedata['widgetsLib']['list'][$key]['bimg'] = $app_base_url . $widgets['app'] . '/widgets/' . $widgets['name'] . '/images/preview.jpg';
                 } else {
                     $this->pagedata['widgetsLib']['list'][$key]['bimg'] = $this->app->res_url . '/images/widgets/widget.jpg';
                 }
             }
         }
     }
     $this->display('admin/theme/widget/add_widgets_page_extend.html');
 }
开发者ID:sss201413,项目名称:ecstore,代码行数:57,代码来源:widget.php

示例4: add_widgets_page_extend

 public function add_widgets_page_extend()
 {
     $theme = input::get('theme');
     $type = input::get('type');
     $catalog = input::get('catalog');
     $pagedata['theme'] = $theme;
     $pagedata['widgetsLib'] = kernel::single('site_theme_widget')->get_libs_extend($theme, $catalog);
     $app_base_url = kernel::get_app_statics_host_url();
     $theme_url = kernel::get_themes_host_url() . '/' . $theme;
     if ($pagedata['widgetsLib']['list']) {
         foreach ((array) $pagedata['widgetsLib']['list'] as $key => $widgets) {
             if ($widgets['theme']) {
                 if (file_exists(THEME_DIR . '/' . $theme . '/widgets/' . $widgets['name'] . '/images/icon.jpg')) {
                     $pagedata['widgetsLib']['list'][$key]['img'] = $theme_url . '/widgets/' . $widgets['name'] . '/images/icon.jpg';
                 } else {
                     $pagedata['widgetsLib']['list'][$key]['img'] = $this->app->res_url . '/images/widgets/icon.jpg';
                 }
                 if (file_exists(THEME_DIR . '/' . $theme . '/widgets/' . $widgets['name'] . '/images/preview.jpg')) {
                     $pagedata['widgetsLib']['list'][$key]['bimg'] = $theme_url . '/widgets/' . $widgets['name'] . '/images/preview.jpg';
                 } else {
                     $pagedata['widgetsLib']['list'][$key]['bimg'] = $this->app->res_url . '/images/widgets/widget.jpg';
                 }
             }
         }
     }
     return view::make('site/admin/theme/widget/add_widgets_page_extend.html', $pagedata);
 }
开发者ID:453111208,项目名称:bbc,代码行数:27,代码来源:widget.php


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