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