本文整理汇总了PHP中PMA_Theme类的典型用法代码示例。如果您正苦于以下问题:PHP PMA_Theme类的具体用法?PHP PMA_Theme怎么用?PHP PMA_Theme使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了PMA_Theme类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: load
/**
* returns theme object loaded from given folder
* or false if theme is invalid
*
* @static
* @param string path to theme
* @return object PMA_Theme
*/
function load($folder)
{
$theme = new PMA_Theme();
$theme->setPath($folder);
if (!$theme->loadInfo()) {
return false;
}
$theme->checkImgPath();
return $theme;
}
示例2: setUp
/**
* Sets up the fixture, for example, opens a network connection.
* This method is called before a test is executed.
*
* @access protected
* @return void
*/
protected function setUp()
{
$this->object = new PMA_Error('2', 'Compile Error', 'error.txt', 15);
$GLOBALS['pmaThemeImage'] = 'image';
$_SESSION['PMA_Theme'] = PMA_Theme::load('./themes/pmahomme');
$_SESSION['PMA_Theme'] = new PMA_Theme();
}
示例3: setup
/**
* SetUp for test cases
*
* @return void
*/
public function setup()
{
$GLOBALS['server'] = 0;
$GLOBALS['cfg']['DefaultTabDatabase'] = 'db_structure.php';
$GLOBALS['cfg']['MaxNavigationItems'] = 250;
$_SESSION['PMA_Theme'] = PMA_Theme::load('./themes/pmahomme');
}
示例4: setUp
/**
* Prepares environment for the test.
*
* @return void
*/
public function setUp()
{
//$_REQUEST
$_REQUEST['log'] = "index1";
$_REQUEST['pos'] = 3;
//$GLOBALS
$GLOBALS['cfg']['MaxRows'] = 10;
$GLOBALS['server'] = 1;
$GLOBALS['cfg']['ServerDefault'] = "server";
$GLOBALS['cfg']['RememberSorting'] = true;
$GLOBALS['cfg']['SQP'] = array();
$GLOBALS['cfg']['MaxCharactersInDisplayedSQL'] = 1000;
$GLOBALS['cfg']['ShowSQL'] = true;
$GLOBALS['cfg']['TableNavigationLinksMode'] = 'icons';
$GLOBALS['cfg']['LimitChars'] = 100;
$GLOBALS['cfg']['Server']['DisableIS'] = false;
$GLOBALS['table'] = "table";
$GLOBALS['pmaThemeImage'] = 'image';
//$_SESSION
$_SESSION['PMA_Theme'] = PMA_Theme::load('./themes/pmahomme');
$_SESSION['PMA_Theme'] = new PMA_Theme();
$table = $this->getMockBuilder('PMA_Table')->disableOriginalConstructor()->getMock();
$dbi = $this->getMockBuilder('PMA_DatabaseInterface')->disableOriginalConstructor()->getMock();
$dbi->expects($this->any())->method('getTable')->will($this->returnValue($table));
$GLOBALS['dbi'] = $dbi;
$container = Container::getDefaultContainer();
$container->set('db', 'db');
$container->set('table', 'table');
$container->set('dbi', $GLOBALS['dbi']);
$this->response = new \PMA\Test\Stubs\PMA_Response();
$container->set('PMA_Response', $this->response);
$container->alias('response', 'PMA_Response');
}
示例5: setUp
/**
* Test for setUp
*
* @return void
*/
public function setUp()
{
//$GLOBALS
$GLOBALS['cfg']['MaxRows'] = 10;
$GLOBALS['cfg']['ServerDefault'] = "server";
$GLOBALS['cfg']['RememberSorting'] = true;
$GLOBALS['cfg']['SQP'] = array();
$GLOBALS['cfg']['MaxCharactersInDisplayedSQL'] = 1000;
$GLOBALS['cfg']['ShowSQL'] = true;
$GLOBALS['cfg']['TableNavigationLinksMode'] = 'icons';
$GLOBALS['cfg']['LimitChars'] = 100;
$GLOBALS['cfg']['DBG']['sql'] = false;
$GLOBALS['cfg']['Server']['host'] = "localhost";
$GLOBALS['PMA_PHP_SELF'] = PMA_getenv('PHP_SELF');
$GLOBALS['replication_info']['master']['status'] = false;
$GLOBALS['replication_info']['slave']['status'] = false;
$GLOBALS['table'] = "table";
$GLOBALS['pmaThemeImage'] = 'image';
//$_SESSION
$_SESSION['PMA_Theme'] = PMA_Theme::load('./themes/pmahomme');
$_SESSION['PMA_Theme'] = new PMA_Theme();
//Mock DBI
$dbi = $this->getMockBuilder('PMA_DatabaseInterface')->disableOriginalConstructor()->getMock();
//this data is needed when PMA_ServerStatusData constructs
$server_status = array("Aborted_clients" => "0", "Aborted_connects" => "0", "Com_delete_multi" => "0", "Com_create_function" => "0", "Com_empty_query" => "0");
$server_variables = array("auto_increment_increment" => "1", "auto_increment_offset" => "1", "automatic_sp_privileges" => "ON", "back_log" => "50", "big_tables" => "OFF");
$fetchResult = array(array("SHOW GLOBAL STATUS", 0, 1, null, 0, $server_status), array("SHOW GLOBAL VARIABLES", 0, 1, null, 0, $server_variables));
$dbi->expects($this->any())->method('fetchResult')->will($this->returnValueMap($fetchResult));
$GLOBALS['dbi'] = $dbi;
$this->ServerStatusData = new PMA_ServerStatusData();
$upTime = "10h";
$this->ServerStatusData->status['Uptime'] = $upTime;
$this->ServerStatusData->used_queries = array("Com_change_db" => "15", "Com_select" => "12", "Com_set_option" => "54", "Com_show_databases" => "16", "Com_show_status" => "14", "Com_show_tables" => "13");
}
示例6: setUp
/**
* Set up
*
* @return void
*/
public function setUp()
{
//session_start();
// cleaning constants
if (PMA_HAS_RUNKIT) {
$this->oldIISvalue = 'non-defined';
$defined_constants = get_defined_constants(true);
$user_defined_constants = $defined_constants['user'];
if (array_key_exists('PMA_IS_IIS', $user_defined_constants)) {
$this->oldIISvalue = PMA_IS_IIS;
runkit_constant_redefine('PMA_IS_IIS', null);
} else {
runkit_constant_add('PMA_IS_IIS', null);
}
$this->oldSIDvalue = 'non-defined';
if (array_key_exists('SID', $user_defined_constants)) {
$this->oldSIDvalue = SID;
runkit_constant_redefine('SID', null);
} else {
runkit_constant_add('SID', null);
}
}
$_SESSION['PMA_Theme'] = PMA_Theme::load('./themes/pmahomme');
$GLOBALS['server'] = 0;
$GLOBALS['PMA_Config'] = new PMA_Config();
$GLOBALS['PMA_Config']->enableBc();
}
示例7: setup
/**
* Set up global environment.
*
* @return void
*/
public function setup()
{
$GLOBALS['table'] = 'table';
$GLOBALS['db'] = 'db';
$_SESSION['PMA_Theme'] = PMA_Theme::load('./themes/pmahomme');
$_SESSION[' PMA_token '] = 'token';
$GLOBALS['cfg'] = array(
'MySQLManualType' => 'none',
'AjaxEnable' => true,
'ServerDefault' => 1,
'PropertiesIconic' => true,
);
$GLOBALS['server'] = 1;
$GLOBALS['cfg']['Server']['pmadb'] = 'pmadb';
$GLOBALS['cfg']['Server']['user'] = 'user';
$GLOBALS['cfg']['Server']['bookmarktable'] = '';
$GLOBALS['cfg']['Server']['relation'] = '';
$GLOBALS['cfg']['Server']['table_info'] = '';
$GLOBALS['cfg']['Server']['table_coords'] = '';
$GLOBALS['cfg']['Server']['designer_coords'] = '';
$GLOBALS['cfg']['Server']['column_info'] = 'column_info';
$GLOBALS['cfg']['DBG']['sql'] = false;
// need to clear relation test cache
unset($_SESSION['relation']);
}
示例8: setUp
/**
* prepares environment for tests
*
* @return void
*/
public function setUp()
{
$GLOBALS['PMA_Types'] = new PMA_Types_MySQL();
$GLOBALS['cfg']['Server']['user'] = 'pma_user';
$GLOBALS['cfg']['Server']['DisableIS'] = true;
$GLOBALS['cfg']['MaxRows'] = 10;
$GLOBALS['cfg']['ServerDefault'] = "PMA_server";
$GLOBALS['cfg']['ActionLinksMode'] = 'icons';
$GLOBALS['pmaThemeImage'] = 'image';
$GLOBALS['cfg']['CharEditing'] = '';
$GLOBALS['cfg']['LimitChars'] = 50;
$GLOBALS['db'] = 'PMA_db';
$GLOBALS['table'] = 'PMA_table';
//$_SESSION
$GLOBALS['server'] = 1;
$_SESSION['PMA_Theme'] = PMA_Theme::load('./themes/pmahomme');
$_SESSION['PMA_Theme'] = new PMA_Theme();
$_SESSION['relation'][1] = array('PMA_VERSION' => PMA_VERSION, 'centralcolumnswork' => true, 'relwork' => 1, 'db' => 'phpmyadmin', 'relation' => 'relation', 'central_columns' => 'pma_central_columns');
// mock DBI
$dbi = $this->getMockBuilder('PMA_DatabaseInterface')->disableOriginalConstructor()->getMock();
$GLOBALS['dbi'] = $dbi;
// set some common expectations
$dbi->expects($this->any())->method('selectDb')->will($this->returnValue(true));
$dbi->expects($this->any())->method('getColumns')->will($this->returnValue(array("id" => array("Type" => "integer", "Null" => "NO"), "col1" => array("Type" => 'varchar(100)', "Null" => "YES"), "col2" => array("Type" => 'DATETIME', "Null" => "NO"))));
$dbi->expects($this->any())->method('getColumnNames')->will($this->returnValue(array("id", "col1", "col2")));
$dbi->expects($this->any())->method('tryQuery')->will($this->returnValue(true));
$dbi->expects($this->any())->method('getTables')->will($this->returnValue(array("PMA_table", "PMA_table1", "PMA_table2")));
}
示例9: setUp
/**
* Sets up the fixture, for example, opens a network connection.
* This method is called before a test is executed.
*
* @access protected
* @return void
*/
protected function setUp()
{
$_SERVER['SCRIPT_NAME'] = 'index.php';
$GLOBALS['PMA_PHP_SELF'] = 'index.php';
$GLOBALS['db'] = '';
$GLOBALS['table'] = '';
$GLOBALS['text_dir'] = 'ltr';
$GLOBALS['pmaThemeImage'] = 'image';
$GLOBALS['PMA_Config'] = new PMA_Config();
$GLOBALS['PMA_Config']->enableBc();
$GLOBALS['collation_connection'] = 'utf8_general_ci';
$GLOBALS['cfg']['Error_Handler']['gather'] = false;
$GLOBALS['cfg']['Error_Handler']['display'] = false;
$GLOBALS['cfg']['Server']['verbose'] = 'verbose host';
$GLOBALS['cfg']['DefaultTabDatabase'] = 'db_structure.php';
$GLOBALS['server'] = '1';
$_GET['reload_left_frame'] = '1';
$GLOBALS['focus_querywindow'] = 'main_pane_left';
$this->object = new PMA_Footer();
unset($GLOBALS['error_message']);
unset($GLOBALS['sql_query']);
$GLOBALS['error_handler'] = new PMA_Error_Handler();
unset($_POST);
$_SESSION['PMA_Theme'] = PMA_Theme::load('./themes/pmahomme');
$_SESSION['PMA_Theme'] = new PMA_Theme();
}
示例10: setUp
/**
* Prepares environment for the test.
*
* @return void
*/
public function setUp()
{
//$_REQUEST
$_REQUEST['log'] = "index1";
$_REQUEST['pos'] = 3;
$_REQUEST['mr_adduser'] = "mr_adduser";
//$GLOBALS
$GLOBALS['cfg']['MaxRows'] = 10;
$GLOBALS['cfg']['ServerDefault'] = "server";
$GLOBALS['cfg']['RememberSorting'] = true;
$GLOBALS['cfg']['SQP'] = array();
$GLOBALS['cfg']['MaxCharactersInDisplayedSQL'] = 1000;
$GLOBALS['cfg']['ShowSQL'] = true;
$GLOBALS['cfg']['TableNavigationLinksMode'] = 'icons';
$GLOBALS['cfg']['LimitChars'] = 100;
$GLOBALS['cfg']['DBG']['sql'] = false;
$GLOBALS['cfg']['ShowHint'] = true;
$GLOBALS['table'] = "table";
$GLOBALS['url_params'] = array();
$GLOBALS['pmaThemeImage'] = 'image';
//$_SESSION
$_SESSION['PMA_Theme'] = PMA_Theme::load('./themes/pmahomme');
$_SESSION['PMA_Theme'] = new PMA_Theme();
//Mock DBI
$slave_host = array(array('Server_id' => 'Server_id1', 'Host' => 'Host1'), array('Server_id' => 'Server_id2', 'Host' => 'Host2'));
$fetchResult = array(array("SHOW SLAVE HOSTS", null, null, null, 0, $slave_host));
$dbi = $this->getMockBuilder('PMA_DatabaseInterface')->disableOriginalConstructor()->getMock();
$dbi->expects($this->any())->method('fetchResult')->will($this->returnValueMap($fetchResult));
$fields_info = array("Host" => array("Field" => "host", "Type" => "char(60)", "Null" => "NO"));
$dbi->expects($this->any())->method('getColumns')->will($this->returnValue($fields_info));
$GLOBALS['dbi'] = $dbi;
}
示例11: setUp
/**
* prepares environment for tests
*
* @return void
*/
public function setUp()
{
$GLOBALS['cfg']['LimitChars'] = 50;
$GLOBALS['PMA_Types'] = new PMA_Types_MySQL();
$GLOBALS['cfg']['ServerDefault'] = "PMA_server";
$GLOBALS['pmaThemeImage'] = 'image';
$GLOBALS['cfg']['ShowHint'] = true;
$GLOBALS['cfg']['CharEditing'] = '';
$GLOBALS['cfg']['ActionLinksMode'] = 'icons';
$GLOBALS['db'] = 'PMA_db';
$GLOBALS['table'] = 'PMA_table';
$GLOBALS['server'] = 1;
//$_SESSION
$_SESSION['PMA_Theme'] = PMA_Theme::load('./themes/pmahomme');
$_SESSION['PMA_Theme'] = new PMA_Theme();
//mock DBI
$dbi = $this->getMockBuilder('PMA_DatabaseInterface')->disableOriginalConstructor()->getMock();
$GLOBALS['dbi'] = $dbi;
// set expectations
$dbi->expects($this->any())->method('selectDb')->will($this->returnValue(true));
$dbi->expects($this->any())->method('getColumns')->will($this->returnValue(array("id" => array("Type" => "integer"), "col1" => array("Type" => 'varchar(100)'), "col2" => array("Type" => 'DATETIME'))));
$dbi->expects($this->any())->method('getColumnNames')->will($this->returnValue(array("id", "col1", "col2")));
$map = array(array('PMA_db', 'PMA_table1', null, array()), array('PMA_db', 'PMA_table', null, array(array('Key_name' => 'PRIMARY', 'Column_name' => 'id'))), array('PMA_db', 'PMA_table2', null, array(array('Key_name' => 'PRIMARY', 'Column_name' => 'id'), array('Key_name' => 'PRIMARY', 'Column_name' => 'col1'))));
$dbi->expects($this->any())->method('getTableIndexes')->will($this->returnValueMap($map));
$dbi->expects($this->any())->method('tryQuery')->will($this->returnValue(true));
$dbi->expects($this->any())->method('fetchResult')->will($this->returnValue(array(0)));
}
示例12: setUp
/**
* Test for setUp
*
* @return void
*/
public function setUp()
{
//$_REQUEST
$_REQUEST['log'] = "index1";
$_REQUEST['pos'] = 3;
//$GLOBALS
$GLOBALS['cfg']['MaxRows'] = 10;
$GLOBALS['cfg']['ServerDefault'] = "server";
$GLOBALS['cfg']['RememberSorting'] = true;
$GLOBALS['cfg']['SQP'] = array();
$GLOBALS['cfg']['MaxCharactersInDisplayedSQL'] = 1000;
$GLOBALS['cfg']['ShowSQL'] = true;
$GLOBALS['cfg']['TableNavigationLinksMode'] = 'icons';
$GLOBALS['cfg']['LimitChars'] = 100;
$GLOBALS['cfg']['DBG']['sql'] = false;
$GLOBALS['cfg']['Server']['host'] = "localhost";
$GLOBALS['PMA_PHP_SELF'] = PMA_getenv('PHP_SELF');
$GLOBALS['server_master_status'] = false;
$GLOBALS['server_slave_status'] = false;
$GLOBALS['table'] = "table";
$GLOBALS['pmaThemeImage'] = 'image';
//$_SESSION
$_SESSION['PMA_Theme'] = PMA_Theme::load('./themes/pmahomme');
$_SESSION['PMA_Theme'] = new PMA_Theme();
//Mock DBI
$dbi = $this->getMockBuilder('PMA_DatabaseInterface')->disableOriginalConstructor()->getMock();
//this data is needed when PMA_ServerStatusData constructs
$server_status = array("Aborted_clients" => "0", "Aborted_connects" => "0", "Com_delete_multi" => "0", "Com_create_function" => "0", "Com_empty_query" => "0");
$server_variables = array("auto_increment_increment" => "1", "auto_increment_offset" => "1", "automatic_sp_privileges" => "ON", "back_log" => "50", "big_tables" => "OFF");
$fetchResult = array(array("SHOW GLOBAL STATUS", 0, 1, null, 0, $server_status), array("SHOW GLOBAL VARIABLES", 0, 1, null, 0, $server_variables), array("SELECT concat('Com_', variable_name), variable_value " . "FROM data_dictionary.GLOBAL_STATEMENTS", 0, 1, null, 0, $server_status));
$dbi->expects($this->any())->method('fetchResult')->will($this->returnValueMap($fetchResult));
$GLOBALS['dbi'] = $dbi;
$this->ServerStatusData = new PMA_ServerStatusData();
}
示例13: setUp
/**
* Test for setUp
*
* @return void
*/
public function setUp()
{
//$GLOBALS
$GLOBALS['cfg']['MaxRows'] = 10;
$GLOBALS['cfg']['ExecTimeLimit'] = 300;
$GLOBALS['cfg']['ServerDefault'] = "PMA_server";
$GLOBALS['cfg']['TableNavigationLinksMode'] = 'icons';
$GLOBALS['cfg']['LimitChars'] = 100;
$GLOBALS['cfg']['ActionLinksMode'] = 'icons';
$GLOBALS['cfg']['Server']['host'] = "localhost";
$GLOBALS['cfg']['Server']['user'] = "pma_user";
$GLOBALS['cfg']['ShowHint'] = true;
$GLOBALS['cfg']['ActionLinksMode'] = 'icons';
$GLOBALS['cfg']['ZipDump'] = true;
$GLOBALS['cfg']['GZipDump'] = false;
$GLOBALS['cfg']['BZipDump'] = false;
$GLOBALS['cfg']['Export']['asfile'] = true;
$GLOBALS['cfg']['Export']['file_template_server'] = "file_template_server";
$GLOBALS['PMA_PHP_SELF'] = PMA_getenv('PHP_SELF');
$GLOBALS['PMA_recoding_engine'] = "InnerDB";
$GLOBALS['server'] = 0;
$GLOBALS['table'] = "table";
$GLOBALS['pmaThemeImage'] = 'image';
$GLOBALS['db'] = "PMA";
//$_SESSION
$_SESSION['PMA_Theme'] = PMA_Theme::load('./themes/pmahomme');
$_SESSION['PMA_Theme'] = new PMA_Theme();
$_SESSION['relation'][$GLOBALS['server']] = "";
$pmaconfig = $this->getMockBuilder('PMA_Config')->disableOriginalConstructor()->getMock();
$pmaconfig->expects($this->any())->method('getUserValue')->will($this->returnValue('user value for test'));
$GLOBALS['PMA_Config'] = $pmaconfig;
}
示例14: setUp
/**
* Prepares environment for the test.
*
* @return void
*/
public function setUp()
{
//$_REQUEST
$_REQUEST['log'] = "index1";
$_REQUEST['pos'] = 3;
//$GLOBALS
$GLOBALS['PMA_Config'] = new PMA_Config();
$GLOBALS['PMA_Config']->enableBc();
$GLOBALS['cfg']['MaxRows'] = 10;
$GLOBALS['cfg']['MaxDbList'] = 100;
$GLOBALS['cfg']['ServerDefault'] = "server";
$GLOBALS['cfg']['RememberSorting'] = true;
$GLOBALS['cfg']['SQP'] = array();
$GLOBALS['cfg']['MaxCharactersInDisplayedSQL'] = 1000;
$GLOBALS['cfg']['ShowSQL'] = true;
$GLOBALS['cfg']['TableNavigationLinksMode'] = 'icons';
$GLOBALS['cfg']['LimitChars'] = 100;
$GLOBALS['cfg']['DBG']['sql'] = false;
$GLOBALS['cfg']['ActionLinksMode'] = "both";
$GLOBALS['cfg']['DefaultTabDatabase'] = 'db_structure.php';
$GLOBALS['table'] = "table";
$GLOBALS['server_master_status'] = false;
$GLOBALS['server_slave_status'] = false;
$GLOBALS['pmaThemeImage'] = 'image';
$GLOBALS['text_dir'] = "text_dir";
//$_SESSION
$_SESSION['PMA_Theme'] = PMA_Theme::load('./themes/pmahomme');
$_SESSION['PMA_Theme'] = new PMA_Theme();
}
示例15: setUp
/**
* Test for setUp
*
* @return void
*/
public function setUp()
{
//$_REQUEST
$_REQUEST['log'] = "index1";
$_REQUEST['pos'] = 3;
//$GLOBALS
$GLOBALS['cfg']['MaxRows'] = 10;
$GLOBALS['cfg']['ServerDefault'] = "server";
$GLOBALS['cfg']['RememberSorting'] = true;
$GLOBALS['cfg']['SQP'] = array();
$GLOBALS['cfg']['MaxCharactersInDisplayedSQL'] = 1000;
$GLOBALS['cfg']['ShowSQL'] = true;
$GLOBALS['cfg']['TableNavigationLinksMode'] = 'icons';
$GLOBALS['cfg']['LimitChars'] = 100;
$GLOBALS['cfg']['DBG']['sql'] = false;
$GLOBALS['cfg']['Server']['host'] = "localhost";
$GLOBALS['cfg']['ActionLinksMode'] = 'icons';
$GLOBALS['PMA_PHP_SELF'] = PMA_getenv('PHP_SELF');
$GLOBALS['table'] = "table";
$GLOBALS['pmaThemeImage'] = 'image';
//$_SESSION
$_SESSION['PMA_Theme'] = PMA_Theme::load('./themes/pmahomme');
$_SESSION['PMA_Theme'] = new PMA_Theme();
//Mock DBI
$dbi = $this->getMockBuilder('PMA_DatabaseInterface')->disableOriginalConstructor()->getMock();
//this data is needed when PMA_ServerStatusData constructs
$server_session_variable = array("auto_increment_increment" => "1", "auto_increment_offset" => "13", "automatic_sp_privileges" => "ON", "back_log" => "50", "big_tables" => "OFF");
$server_global_variables = array("auto_increment_increment" => "0", "auto_increment_offset" => "12");
$fetchResult = array(array("SHOW SESSION VARIABLES;", 0, 1, null, 0, $server_session_variable), array("SHOW GLOBAL VARIABLES;", 0, 1, null, 0, $server_global_variables));
$dbi->expects($this->any())->method('fetchResult')->will($this->returnValueMap($fetchResult));
$GLOBALS['dbi'] = $dbi;
}