本文整理汇总了PHP中JVersion::getLongVersion方法的典型用法代码示例。如果您正苦于以下问题:PHP JVersion::getLongVersion方法的具体用法?PHP JVersion::getLongVersion怎么用?PHP JVersion::getLongVersion使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类JVersion
的用法示例。
在下文中一共展示了JVersion::getLongVersion方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: testGetLongVersion
/**
* This checks for the correct Long Version.
*
* @return void
*/
public function testGetLongVersion()
{
$expected = 'Joomla! 12.23.999 Testing [ Desperation ] 22-June-3109 13:13 CDT';
$this->assertEquals(
$expected,
$this->object->getLongVersion(),
'Should get the correct Long Version'
);
}
示例2: getInfo
public function getInfo()
{
$info = array();
$version = new JVersion();
$platform = new JPlatform();
$db = JFactory::getDbo();
if (isset($_SERVER['SERVER_SOFTWARE'])) {
$sf = $_SERVER['SERVER_SOFTWARE'];
} else {
$sf = getenv('SERVER_SOFTWARE');
}
$info['php'] = php_uname();
$info['dbversion'] = $db->getVersion();
$info['dbcollation'] = $db->getCollation();
$info['phpversion'] = phpversion();
$info['server'] = $sf;
$info['sapi_name'] = php_sapi_name();
$info['version'] = $version->getLongVersion();
$info['platform'] = $platform->getLongVersion();
$info['useragent'] = isset($_SERVER['HTTP_USER_AGENT']) ? $_SERVER['HTTP_USER_AGENT'] : "";
$info['j2store_version'] = $this->getJ2storeVerion();
$info['is_pro'] = J2Store::isPro();
$info['curl'] = $this->_isCurl();
$info['json'] = $this->_isJson();
$config = JFactory::getConfig();
$info['error_reporting'] = $config->get('error_reporting');
$caching = $config->get('caching');
$info['caching'] = $caching ? JText::_('J2STORE_ENABLED') : JText::_('J2STORE_DISABLED');
$cache_plugin = JPluginHelper::isEnabled('system', 'cache');
$info['plg_cache_enabled'] = $cache_plugin;
$info['memory_limit'] = ini_get('memory_limit');
return $info;
}
示例3: JVersion
function _loadVersions()
{
$version = new JVersion();
$this->data['Versions']['Joomla!'] = $version->getLongVersion();
$this->data['Versions']['J!Dump'] = DUMP_VERSION;
$this->data['Versions']['PHP'] = phpversion();
$this->data['Versions']['Apache'] = function_exists('apache_get_version') ? apache_get_version() : 'unknown';
$this->data['Versions']['Zend Engine'] = zend_version();
}
示例4: getVersion
/**
* Get the member items of the submenu.
*
* @param \Joomla\Registry\Registry &$params The parameters object.
*
* @return string String containing the current Joomla version based on the selected format.
*/
public static function getVersion(&$params)
{
$version = new JVersion();
$versionText = $version->getShortVersion();
$product = $params->get('product', 0);
if ($params->get('format', 'short') === 'long') {
$versionText = str_replace($version::PRODUCT . ' ', '', $version->getLongVersion());
}
if (!empty($product)) {
$versionText = $version::PRODUCT . ' ' . $versionText;
}
return $versionText;
}
示例5: execute
/**
* Execute the version command
*
* @param InputInterface $input An InputInterface instance
* @param OutputInterface $output An OutputInterface instance
*
* @return void
*/
protected function execute(InputInterface $input, OutputInterface $output)
{
$this->setupEnvironment('site', $input, $output);
$version = new \JVersion();
if ($input->getOption('short')) {
$result = $version->getShortVersion();
} elseif ($input->getOption('release')) {
$result = $version->RELEASE;
} else {
$result = $version->getLongVersion();
}
$output->writeln($result);
}
示例6: getList
public function getList()
{
if(!$this->_list)
{
$nooku_version = new JVersion();
$server_software = $_SERVER['SERVER_SOFTWARE'] ? $_SERVER['SERVER_SOFTWARE'] : JText::_('n/a');
$rows = array(
array(
'setting' => JText::_('PHP Built On'),
'value' => php_uname()
),
array(
'setting' => JText::_('Database Version'),
'value' => mysqli_get_server_info(KFactory::get('koowa:database.adapter.mysqli')->getConnection())
),
array(
'setting' => JText::_('Database Collation'),
'value' => KFactory::get('com://admin/extensions.database.table.plugins')->getSchema()->collation
),
array(
'setting' => JText::_('PHP Version'),
'value' => phpversion()
),
array(
'setting' => JText::_('Web Server'),
'value' => $server_software
),
array(
'setting' => JText::_('WebServer to PHP Interface'),
'value' => php_sapi_name()
),
array(
'setting' => JText::_('Nooku Server Version'),
'value' => $nooku_version->getLongVersion()
),
array(
'setting' => JText::_('User Agent'),
'value' => $_SERVER['HTTP_USER_AGENT'], ENT_QUOTES
)
);
$this->_list = KFactory::get('com://admin/info.database.rowset.system')
->addData($rows, false);
}
return $this->_list;
}
示例7: php_sapi_name
<?php
echo php_sapi_name();
?>
</td>
</tr>
<tr>
<td>
<strong><?php
echo JText::_('Joomla! Version');
?>
:</strong>
</td>
<td>
<?php
$version = new JVersion();
echo $version->getLongVersion();
?>
</td>
</tr>
<tr>
<td>
<strong><?php
echo JText::_('User Agent');
?>
:</strong>
</td>
<td>
<?php
echo phpversion() <= "4.2.1" ? getenv("HTTP_USER_AGENT") : $_SERVER['HTTP_USER_AGENT'];
?>
</td>
示例8: testGetLongVersion
/**
* Tests the getLongVersion method
*
* @return void
*
* @since 3.0
*/
public function testGetLongVersion()
{
$this->assertInternalType('string', $this->object->getLongVersion());
}
示例9: getPlatformVersion
/**
* Returns the platform name and version
* @param string $platform_name Name of the platform, e.g. Joomla!
* @param string $version Full version of the platform
*/
public function getPlatformVersion(&$platform_name, &$version)
{
// Load the version.php of the suitable Joomla! release
if (!class_exists('JVersion')) {
$paths = array(JPATH_SITE . '/libraries/cms/version/version.php', JPATH_SITE . '/libraries/joomla/version.php', JPATH_SITE . '/includes/version.php');
foreach ($paths as $path) {
if (@file_exists($path)) {
require_once $path;
break;
}
}
}
$platform_name = "Joomla!";
$v = new JVersion();
$version = $v->getLongVersion();
}
示例10: getSystemReport
/**
* Method to generate all the reportconfiguration.
*
* @return string
* @since 1.6
*/
public function getSystemReport () {
$kunena_app = JFactory::getApplication ();
$kunena_db = JFactory::getDBO ();
$JVersion = new JVersion();
$jversion = $JVersion->getLongVersion();
if($kunena_app->getCfg('legacy' )) {
$jconfig_legacy = '[color=#FF0000]Enabled[/color]';
} else {
$jconfig_legacy = 'Disabled';
}
if(!$kunena_app->getCfg('smtpuser' )) {
$jconfig_smtpuser = 'Empty';
} else {
$jconfig_smtpuser = $kunena_app->getCfg('smtpuser' );
}
if($kunena_app->getCfg('ftp_enable' )) {
$jconfig_ftp = 'Enabled';
} else {
$jconfig_ftp = 'Disabled';
}
if($kunena_app->getCfg('sef' )) {
$jconfig_sef = 'Enabled';
} else {
$jconfig_sef = 'Disabled';
}
if($kunena_app->getCfg('sef_rewrite' )) {
$jconfig_sef_rewrite = 'Enabled';
} else {
$jconfig_sef_rewrite = 'Disabled';
}
if (file_exists(JPATH_ROOT.'/.htaccess')) {
$htaccess = 'Exists';
} else {
$htaccess = 'Missing';
}
if(ini_get('register_globals')) {
$register_globals = '[u]register_globals:[/u] [color=#FF0000]On[/color]';
} else {
$register_globals = '[u]register_globals:[/u] Off';
}
if(ini_get('safe_mode')) {
$safe_mode = '[u]safe_mode:[/u] [color=#FF0000]On[/color]';
} else {
$safe_mode = '[u]safe_mode:[/u] Off';
}
if(extension_loaded('mbstring')) {
$mbstring = '[u]mbstring:[/u] Enabled';
} else {
$mbstring = '[u]mbstring:[/u] [color=#FF0000]Not installed[/color]';
}
if(extension_loaded('gd')) {
$gd_info = gd_info ();
$gd_support = '[u]GD:[/u] '.$gd_info['GD Version'] ;
} else {
$gd_support = '[u]GD:[/u] [color=#FF0000]Not installed[/color]';
}
$maxExecTime = ini_get('max_execution_time');
$maxExecMem = ini_get('memory_limit');
$fileuploads = ini_get('upload_max_filesize');
$kunenaVersionInfo = KunenaVersion::getVersionHTML ();
// Get Kunena default template
$ktemplate = KunenaFactory::getTemplate();
$ktempaltedetails = $ktemplate->getTemplateDetails();
//get all the config settings for Kunena
$kconfig = $this->_getKunenaConfiguration();
$jtemplatedetails = $this->_getJoomlaTemplate($JVersion);
$joomlamenudetails = $this->_getJoomlaMenuDetails($JVersion);
$collation = $this->_getTablesCollation();
$kconfigsettings = $this->_getKunenaConfiguration();
// Check if Mootools plugins and others kunena plugins are enabled, and get the version of this modules
jimport( 'joomla.plugin.helper' );
if ( JPluginHelper::isEnabled('system', 'mtupgrade') ) $mtupgrade = '[u]System - Mootools Upgrade:[/u] Enabled';
else $mtupgrade = '[u]System - Mootools Upgrade:[/u] Disabled';
if ( JPluginHelper::isEnabled('system', 'mootools12') ) $plg_mt = '[u]System - Mootools12:[/u] Enabled';
else $plg_mt = '[u]System - Mootools12:[/u] Disabled';
$plg['jfirephp'] = $this->_checkThirdPartyVersion('jfirephp', 'jfirephp', 'JFirePHP', 'plugins/system', 'system', 0, 0, 1);
$plg['ksearch'] = $this->_checkThirdPartyVersion('kunenasearch', 'kunenasearch', 'Kunena Search', 'plugins/search', 'search', 0, 0, 1);
$plg['kdiscuss'] = $this->_checkThirdPartyVersion('kunenadiscuss', 'kunenadiscuss', 'Kunena Discuss', 'plugins/content', 'content', 0, 0, 1);
$plg['jxfinderkunena'] = $this->_checkThirdPartyVersion('plg_jxfinder_kunena', 'plg_jxfinder_kunena', 'Finder Kunena Posts', 'plugins/finder', 'finder', 0, 0, 1);
$plg['kjomsocialmenu'] = $this->_checkThirdPartyVersion('kunenamenu', 'kunenamenu', 'My Kunena Forum Menu', 'plugins/community', 'community', 0, 0, 1);
//.........这里部分代码省略.........
示例11: testGetLongVersion
/**
* Tests the getLongVersion method
*
* @return void
*
* @since 3.0
*
* @covers JVersion::getLongVersion
*/
public function testGetLongVersion()
{
$this->assertThat($this->object->getLongVersion(), $this->isType('string'), 'getLongVersion should return a string with the full version information.');
}
示例12: getInfo
/**
* Method to get the system information
*
* @return array System information values
*/
public function getInfo()
{
if (is_null($this->info)) {
$version = new \JVersion();
$platform = new \JPlatform();
$db = \App::get('db');
if (isset($_SERVER['SERVER_SOFTWARE'])) {
$sf = $_SERVER['SERVER_SOFTWARE'];
} else {
$sf = getenv('SERVER_SOFTWARE');
}
$this->info = array();
$this->info['php'] = php_uname();
$this->info['dbversion'] = $db->getVersion();
$this->info['dbcollation'] = $db->getCollation();
$this->info['phpversion'] = phpversion();
$this->info['server'] = $sf;
$this->info['sapi_name'] = php_sapi_name();
$this->info['version'] = $version->getLongVersion();
$this->info['platform'] = $platform->getLongVersion();
$this->info['useragent'] = $_SERVER['HTTP_USER_AGENT'];
}
return $this->info;
}
示例13: jimport
/**
* Open the log file pointer and create the file if it doesn't exist
*
* @access public
* @return boolean True on success
* @since 1.5
*/
function _openLog()
{
// Only open if not already opened...
if (is_resource($this->_file)) {
return true;
}
$now =& JFactory::getDate();
$date = $now->toMySQL();
if (!file_exists($this->_path)) {
jimport("joomla.filesystem.folder");
if (!JFolder::create(dirname($this->_path))) {
return false;
}
// Start with empty comment line to prevent file content from being shown due to a PHP CGI bug -
// see http://joomlacode.org/gf/project/joomla/tracker/?action=TrackerItemEdit&tracker_item_id=27641
$header[] = "#";
$header[] = "#<?php die('Direct Access To Log Files Not Permitted'); ?>";
$header[] = "#Version: 1.0";
$header[] = "#Date: " . $date;
// Prepare the fields string
$fields = str_replace("{", "", $this->_format);
$fields = str_replace("}", "", $fields);
$fields = strtolower($fields);
$header[] = "#Fields: " . $fields;
// Prepare the software string
$version = new JVersion();
$header[] = "#Software: " . $version->getLongVersion();
$head = implode("\n", $header);
} else {
$head = false;
}
if (!($this->_file = fopen($this->_path, "a"))) {
return false;
}
if ($head) {
if (!fputs($this->_file, $head)) {
return false;
}
}
// If we opened the file lets make sure we close it
register_shutdown_function(array(&$this, '_closeLog'));
return true;
}
示例14: preInstall
/**
* The the pre-install info page
*
* @return boolean True if successful
* @access public
* @since 1.5
*/
function preInstall()
{
$steps =& $this->getSteps();
$steps['preinstall'] = 'on';
$model =& $this->getModel();
$lists =& $model->getData('lists');
$version = new JVersion();
$this->assign('version', $version->getLongVersion());
$this->assign('php_options', $lists['phpOptions']);
$this->assign('php_settings', $lists['phpSettings']);
$this->assign('page', 'preinstall');
$this->assign('steps', $steps);
$this->display();
}
示例15: array
/**
* method to get the system information
*
* @return array system information values
*/
function &getInfo()
{
if (is_null($this->info)) {
$this->info = array();
$version = new JVersion();
$db = JFactory::getDBO();
if (isset($_SERVER['SERVER_SOFTWARE'])) {
$sf = $_SERVER['SERVER_SOFTWARE'];
} else {
$sf = getenv('SERVER_SOFTWARE');
}
$this->info['php'] = php_uname();
$this->info['dbversion'] = $db->getVersion();
$this->info['dbcollation'] = $db->getCollation();
$this->info['phpversion'] = phpversion();
$this->info['server'] = $sf;
$this->info['sapi_name'] = php_sapi_name();
$this->info['version'] = $version->getLongVersion();
$this->info['useragent'] = phpversion() <= '4.2.1' ? getenv("HTTP_USER_AGENT") : $_SERVER['HTTP_USER_AGENT'];
}
return $this->info;
}