本文整理匯總了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);
}