本文整理汇总了PHP中PMA_Config::get方法的典型用法代码示例。如果您正苦于以下问题:PHP PMA_Config::get方法的具体用法?PHP PMA_Config::get怎么用?PHP PMA_Config::get使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PMA_Config
的用法示例。
在下文中一共展示了PMA_Config::get方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: testEnableBc
/**
* Test for backward compatibility globals
*
* @depends testCheckSystem
* @depends testCheckWebServer
* @depends testLoadDefaults
*
* @group large
*/
public function testEnableBc()
{
$this->object->enableBc();
$defines = array('PMA_VERSION', 'PMA_THEME_VERSION', 'PMA_THEME_GENERATION', 'PMA_PHP_STR_VERSION', 'PMA_PHP_INT_VERSION', 'PMA_IS_WINDOWS', 'PMA_IS_IIS', 'PMA_IS_GD2', 'PMA_USR_OS', 'PMA_USR_BROWSER_VER', 'PMA_USR_BROWSER_AGENT');
foreach ($defines as $define) {
$this->assertTrue(defined($define));
$this->assertEquals(constant($define), $this->object->get($define));
}
}
示例2: testGetThemeUniqueValue
/**
* Should test getting unique value for theme
*
* @return void
*/
public function testGetThemeUniqueValue()
{
$_SESSION['PMA_Theme'] = PMA_Theme::load('./themes/pmahomme');
$partial_sum = PHPUnit_Framework_Assert::readAttribute($this->object, 'source_mtime') + PHPUnit_Framework_Assert::readAttribute($this->object, 'default_source_mtime') + $this->object->get('user_preferences_mtime') + $_SESSION['PMA_Theme']->mtime_info + $_SESSION['PMA_Theme']->filesize_info;
$this->object->set('fontsize', 10);
$this->assertEquals(10 + $partial_sum, $this->object->getThemeUniqueValue());
$this->object->set('fontsize', null);
$_COOKIE['pma_fontsize'] = 20;
$this->assertEquals(20 + $partial_sum, $this->object->getThemeUniqueValue());
unset($_COOKIE['pma_fontsize']);
$this->assertEquals($partial_sum, $this->object->getThemeUniqueValue());
}
示例3:
* @author Michal Čihař <michal@cihar.com>
* @copyright 2006 Michal Čihař <michal@cihar.com>
* @license http://www.gnu.org/licenses/gpl.html GNU GPL 2.0
* @version $Id: setup.php 13149 2009-12-07 13:09:09Z nijel $
*/
// Grab phpMyAdmin version and PMA_dl function
define('PMA_MINIMUM_COMMON', TRUE);
define('PMA_SETUP', TRUE);
chdir('..');
require_once './libraries/common.inc.php';
// Grab configuration defaults
// Do not use $PMA_Config, it interferes with the one in $_SESSION
// on servers with register_globals enabled
$PMA_Config_Setup = new PMA_Config();
// Script information
$script_info = 'phpMyAdmin ' . $PMA_Config_Setup->get('PMA_VERSION') . ' setup script by Michal Čihař <michal@cihar.com>';
$script_version = '$Id: setup.php 13149 2009-12-07 13:09:09Z nijel $';
// Grab action
if (isset($_POST['action'])) {
$action = $_POST['action'];
} else {
$action = '';
}
// Grab wanted CRLF type
if (isset($_POST['eoltype'])) {
$_SESSION['eoltype'] = $_POST['eoltype'];
} else {
if (PMA_USR_OS == 'Win') {
$_SESSION['eoltype'] = 'dos';
} else {
$_SESSION['eoltype'] = 'unix';
示例4: dirname
* Bootstrap for phpMyAdmin tests
*
* @package PhpMyAdmin-test
*/
// Let PHP complain about all errors
error_reporting(E_ALL);
// Adding phpMyAdmin sources to include path
set_include_path(get_include_path() . PATH_SEPARATOR . dirname(realpath("../index.php")));
// Setting constants for testing
define('PHPMYADMIN', 1);
define('TESTSUITE', 1);
define('PMA_MYSQL_INT_VERSION', 55000);
require_once 'libraries/core.lib.php';
require_once 'libraries/Config.class.php';
$CFG = new PMA_Config();
define('PMA_VERSION', $CFG->get('PMA_VERSION'));
unset($CFG);
session_start();
// You can put some additional code that should run before tests here
// Standard environment for tests
$_SESSION[' PMA_token '] = 'token';
$GLOBALS['lang'] = 'en';
$GLOBALS['is_ajax_request'] = false;
define('PMA_HAS_RUNKIT', function_exists('runkit_constant_redefine'));
$GLOBALS['runkit_internal_override'] = ini_get('runkit.internal_override');
/**
* Function to emulate headers() function by storing headers in GLOBAL array
*
* @param string $string header string
* @param boolean $replace .
* @param integer $http_response_code .
示例5: unserialize
<?php
/* $Id: setup.php,v 1.23.2.10.2.1 2006/08/01 14:01:37 lem9 Exp $ */
// vim: expandtab sw=4 ts=4 sts=4:
// phpMyAdmin setup script by Michal Čihař <michal@cihar.com>
// Grab phpMyAdmin version and PMA_dl function
define('PMA_MINIMUM_COMMON', TRUE);
chdir('..');
require_once './libraries/common.lib.php';
// Grab configuration defaults
$PMA_Config = new PMA_Config();
// Script information
$script_info = 'phpMyAdmin ' . $PMA_Config->get('PMA_VERSION') . ' setup script by Michal Čihař <michal@cihar.com>';
$script_version = '$Id: setup.php,v 1.23.2.10.2.1 2006/08/01 14:01:37 lem9 Exp $';
// Grab action
if (isset($_POST['action'])) {
$action = $_POST['action'];
} else {
$action = '';
}
if (isset($_POST['configuration']) && $action != 'clear') {
// Grab previous configuration, if it should not be cleared
$configuration = unserialize($_POST['configuration']);
} else {
// Start with empty configuration
$configuration = array();
}
// We rely on Servers array to exist, so create it here
if (!isset($configuration['Servers']) || !is_array($configuration['Servers'])) {
$configuration['Servers'] = array();
}