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


PHP Version::get_dbversion方法代码示例

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


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

示例1: testGet_dbversion

 public function testGet_dbversion()
 {
     $this->assertEquals(Version::DB_VERSION, Version::get_dbversion());
 }
开发者ID:psaintlaurent,项目名称:Habari,代码行数:4,代码来源:versionTest.php

示例2: test_get_dbversion

 function test_get_dbversion()
 {
     $this->assert_equal(Version::DB_VERSION, Version::get_dbversion());
 }
开发者ID:habari,项目名称:tests,代码行数:4,代码来源:test_version.php

示例3: get_sysinfo

 /**
  * Handles get requests for the system information page.
  */
 public function get_sysinfo()
 {
     $sysinfo = array();
     $siteinfo = array();
     // Assemble Site Info
     $siteinfo[_t('Habari Version')] = Version::get_habariversion();
     if (Version::is_devel()) {
         $siteinfo[_t('Habari Version')] .= " r" . Version::get_svn_revision();
     }
     $siteinfo[_t('Habari API Version')] = Version::get_apiversion();
     $siteinfo[_t('Habari DB Version')] = Version::get_dbversion();
     $siteinfo[_t('Active Theme')] = Options::get('theme_name');
     $siteinfo[_t('Site Language')] = strlen(Options::get('system_locale')) ? Options::get('system_locale') : 'en-us';
     $this->theme->siteinfo = $siteinfo;
     // Assemble System Info
     $sysinfo[_t('PHP Version')] = phpversion();
     $sysinfo[_t('Server Software')] = $_SERVER['SERVER_SOFTWARE'];
     $sysinfo[_t('Database')] = DB::get_driver_name() . ' - ' . DB::get_driver_version();
     $sysinfo[_t('PHP Extensions')] = implode(', ', get_loaded_extensions());
     if (defined('PCRE_VERSION')) {
         $sysinfo[_t('PCRE Version')] = PCRE_VERSION;
     } else {
         // probably PHP < 5.2.4
         ob_start();
         phpinfo(8);
         $phpinfo = ob_get_contents();
         ob_end_clean();
         preg_match('/PCRE Library Version.*class="v">(.*)$/mi', $phpinfo, $matches);
         $sysinfo[_t('PCRE Version')] = $matches[1];
     }
     $sysinfo[_t('Browser')] = $_SERVER['HTTP_USER_AGENT'];
     $this->theme->sysinfo = $sysinfo;
     // Assemble Class Info
     $classinfo = Utils::glob(HABARI_PATH . "/user/classes/*.php");
     if (count($classinfo)) {
         $classinfo = array_map('realpath', $classinfo);
     }
     $this->theme->classinfo = $classinfo;
     // Assemble Plugin Info
     $raw_plugins = Plugins::get_active();
     $plugins = array('system' => array(), 'user' => array(), '3rdparty' => array(), 'other' => array());
     foreach ($raw_plugins as $plugin) {
         $file = $plugin->get_file();
         if (preg_match('%[\\\\/](system|3rdparty|user)[\\\\/]plugins[\\\\/]%i', $file, $matches)) {
             // A plugin's info is XML, cast the element to a string. See #1026.
             $plugins[strtolower($matches[1])][(string) $plugin->info->name] = $file;
         } else {
             $plugins['other'][$plugin->info->name] = $file;
         }
     }
     $this->theme->plugins = $plugins;
     $this->display('sysinfo');
 }
开发者ID:psaintlaurent,项目名称:Habari,代码行数:56,代码来源:adminhandler.php

示例4: get_sysinfo

 /**
  * Handles get requests for the system information page.
  */
 public function get_sysinfo()
 {
     $sysinfo = array();
     $siteinfo = array();
     // Assemble Site Info
     $siteinfo[_t('Habari Version')] = Version::get_habariversion();
     if (Version::is_devel()) {
         $siteinfo[_t('Habari Version')] .= " " . Version::get_git_short_hash();
     }
     $siteinfo[_t('Habari API Version')] = Version::get_apiversion();
     $siteinfo[_t('Habari DB Version')] = Version::get_dbversion();
     $siteinfo[_t('Active Theme')] = Options::get('theme_name');
     $siteinfo[_t('System Locale')] = HabariLocale::get();
     $siteinfo[_t('Cache Class')] = Cache::get_class();
     $this->theme->siteinfo = $siteinfo;
     // Assemble System Info
     $sysinfo[_t('PHP Version')] = phpversion();
     $sysinfo[_t('Server Software')] = $_SERVER['SERVER_SOFTWARE'];
     $sysinfo[_t('Database')] = DB::get_driver_name() . ' - ' . DB::get_driver_version();
     $sysinfo[_t('PHP Extensions')] = implode(', ', get_loaded_extensions());
     $sysinfo[_t('PHP Configuration Settings')] = implode("<br>", Utils::get_ini_settings());
     if (defined('PCRE_VERSION')) {
         $sysinfo[_t('PCRE Version')] = PCRE_VERSION;
     } else {
         // probably PHP < 5.2.4
         ob_start();
         phpinfo(8);
         $phpinfo = ob_get_contents();
         ob_end_clean();
         preg_match('/PCRE Library Version.*class="v">(.*)$/mi', $phpinfo, $matches);
         $sysinfo[_t('PCRE Version')] = $matches[1];
     }
     $sysinfo[_t('Browser')] = $_SERVER['HTTP_USER_AGENT'];
     $this->theme->sysinfo = $sysinfo;
     // Assemble Class Info
     $classinfo = Utils::glob(HABARI_PATH . "/user/classes/*.php");
     if (count($classinfo)) {
         $classinfo = array_map('realpath', $classinfo);
     }
     $this->theme->classinfo = $classinfo;
     // Assemble Plugin Info
     $raw_plugins = Plugins::get_active();
     $plugins = array('system' => array(), 'user' => array(), '3rdparty' => array(), 'other' => array());
     foreach ($raw_plugins as $plugin) {
         $file = $plugin->get_file();
         // Catch plugins that are symlinked from other locations as ReflectionClass->getFileName() only returns the ultimate file path, not the symlink path, and we really want the symlink path
         $all_plugins = Plugins::list_all();
         $filename = basename($file);
         if (array_key_exists($filename, $all_plugins) && $all_plugins[$filename] != $file) {
             $file = $all_plugins[$filename];
         }
         if (preg_match('%[\\\\/](system|3rdparty|user)[\\\\/]plugins[\\\\/]%i', $file, $matches)) {
             // A plugin's info is XML, cast the element to a string. See #1026.
             $plugins[strtolower($matches[1])][(string) $plugin->info->name] = $file;
         } else {
             // A plugin's info is XML, cast the element to a string.
             $plugins['other'][(string) $plugin->info->name] = $file;
         }
     }
     $this->theme->plugins = $plugins;
     $this->theme->admin_page = _t('System Information');
     $this->display('sysinfo');
 }
开发者ID:wwxgitcat,项目名称:habari,代码行数:66,代码来源:adminhandler.php


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