本文整理汇总了PHP中EB::getLocalVersion方法的典型用法代码示例。如果您正苦于以下问题:PHP EB::getLocalVersion方法的具体用法?PHP EB::getLocalVersion怎么用?PHP EB::getLocalVersion使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类EB
的用法示例。
在下文中一共展示了EB::getLocalVersion方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __construct
public function __construct()
{
$this->config = EB::config();
$this->doc = JFactory::getDocument();
// If environment is set to production, change to static.
$environment = $this->config->get('easyblog_environment');
if ($environment == 'production') {
$environment = 'static';
}
$this->namespace = 'EASYBLOG';
$this->shortName = 'eb';
$this->environment = $environment;
$this->mode = $this->config->get('easyblog_mode');
$this->version = (string) EB::getLocalVersion();
$this->baseUrl = EB::getBaseUrl();
$this->token = EB::getToken();
$this->inline = $this->config->get('inline_configuration');
$this->enableCdn = $this->config->get('enable_cdn');
$this->ajaxUrl = JURI::base() . '?option=com_easyblog';
// If we should use http://site.com/index.php for the ajax calls, we need to append it here
if ($this->config->get('ajax_use_index')) {
$this->ajaxUrl = JURI::base() . 'index.php?option=com_easyblog';
}
parent::__construct();
}
示例2: __construct
public function __construct()
{
if (defined('EASYBLOG_COMPONENT_CLI')) {
$this->cli = true;
}
if ($this->cli) {
$this->version = EASYBLOG_COMPONENT_VERSION;
}
if (!$this->cli) {
$this->version = (string) EB::getLocalVersion();
}
$this->resourceManifestFile = EASYBLOG_RESOURCES . '/default-' . $this->version . '.json';
}
示例3: versionChecks
/**
* Main method to display the dashboard view.
*
* @since 4.0
* @access public
* @return null
*
* @author Mark Lee <mark@stackideas.com>
*/
public function versionChecks()
{
$localVersion = EB::getLocalVersion();
// Get the online version from the server
$onlineVersion = EB::getLatestVersion();
$theme = EB::template();
$theme->set('localVersion', $localVersion);
$theme->set('onlineVersion', $onlineVersion);
$contents = '';
$state = version_compare($localVersion, $onlineVersion);
$outdated = $state === -1;
$file = $outdated ? 'version.outdated' : 'version.latest';
// Version up to date
$contents = $theme->output('admin/structure/' . $file);
return $this->ajax->resolve($contents, $outdated, $localVersion, $onlineVersion);
}
示例4: __construct
public function __construct()
{
$this->config = EB::config();
$this->doc = JFactory::getDocument();
// If environment is set to production, change to static.
$environment = $this->config->get('easyblog_environment');
if ($environment == 'production') {
$environment = 'static';
}
$this->namespace = 'EASYBLOG';
$this->shortName = 'eb';
$this->environment = $environment;
$this->mode = $this->config->get('easyblog_mode');
$this->version = (string) EB::getLocalVersion();
$this->baseUrl = EB::getBaseUrl();
$this->token = EB::getToken();
$this->inline = $this->config->get('inline_configuration');
$this->enableCdn = $this->config->get('enable_cdn');
parent::__construct();
}
示例5: display
/**
* Override parent's implementation
*
* @since 1.2
* @access public
* @param string
* @return
*/
public function display($tpl = null)
{
// Set the appropriate namespace
$namespace = 'admin/' . $tpl;
// Get the child contents
$output = $this->theme->output($namespace);
// Get the sidebar
$sidebar = $this->getSidebar();
// Determine if this is a tmpl view
$tmpl = $this->input->get('tmpl', '', 'word');
// Prepare the structure
$theme = EB::getTemplate();
// Get current version
$version = EB::getLocalVersion();
// Render a different structure prefix when tmpl=component
$prefix = $tmpl == 'component' ? 'eb-window' : '';
// Initialize all javascript frameworks
EB::init('admin');
// Collect all javascripts attached so that we can output them at the bottom of the page
$scripts = EB::scripts()->getScripts();
$theme->set('info', $this->info);
$theme->set('prefix', $prefix);
$theme->set('version', $version);
$theme->set('heading', $this->heading);
$theme->set('desc', $this->desc);
$theme->set('output', $output);
$theme->set('tmpl', $tmpl);
$theme->set('sidebar', $sidebar);
$theme->set('jscripts', $scripts);
$contents = $theme->output('admin/structure/default');
// If the toolbar registration exists, load it up
if (method_exists($this, 'registerToolbar')) {
$this->registerToolbar();
}
echo $contents;
}