本文整理汇总了PHP中PMA_Theme::load方法的典型用法代码示例。如果您正苦于以下问题:PHP PMA_Theme::load方法的具体用法?PHP PMA_Theme::load怎么用?PHP PMA_Theme::load使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PMA_Theme
的用法示例。
在下文中一共展示了PMA_Theme::load方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: 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");
}
示例2: 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")));
}
示例3: 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');
}
示例4: 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();
}
示例5: 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;
}
示例6: 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']);
}
示例7: 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();
}
示例8: 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();
}
示例9: 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');
}
示例10: 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']['Server']['DisableIS'] = false;
$GLOBALS['server'] = 0;
$GLOBALS['cfg']['ActionLinksMode'] = "both";
$GLOBALS['pmaThemeImage'] = 'image';
//_SESSION
$_SESSION['relation'][$GLOBALS['server']] = array('table_coords' => "table_name", 'displaywork' => 'displaywork', 'db' => "information_schema", 'table_info' => 'table_info', 'relwork' => 'relwork', 'commwork' => 'commwork', 'displaywork' => 'displaywork', 'pdfwork' => 'pdfwork', 'column_info' => 'column_info', 'relation' => 'relation', 'relwork' => 'relwork');
//$_SESSION
$_SESSION['PMA_Theme'] = PMA_Theme::load('./themes/pmahomme');
$_SESSION['PMA_Theme'] = new PMA_Theme();
//Mock DBI
$dbi = $this->getMockBuilder('PMA_DatabaseInterface')->disableOriginalConstructor()->getMock();
$dbi->expects($this->any())->method('query')->will($this->returnValue(true));
$GLOBALS['dbi'] = $dbi;
}
示例11: 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();
}
示例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()
{
//$_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;
}
示例14: 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_Handler();
$GLOBALS['pmaThemeImage'] = 'image';
$_SESSION['PMA_Theme'] = PMA_Theme::load('./themes/pmahomme');
$_SESSION['PMA_Theme'] = new PMA_Theme();
}
示例15: 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()
{
$GLOBALS['plugin_param'] = "csv";
$this->object = new ImportCsv();
//setting
$GLOBALS['finished'] = false;
$GLOBALS['read_limit'] = 100000000;
$GLOBALS['offset'] = 0;
$GLOBALS['cfg']['Server']['DisableIS'] = false;
$GLOBALS['cfg']['ServerDefault'] = 0;
$GLOBALS['cfg']['AllowUserDropDatabase'] = false;
$GLOBALS['cfg']['ShowHint'] = true;
$GLOBALS['import_file'] = 'test/test_data/db_test.csv';
$GLOBALS['import_text'] = 'ImportCsv_Test';
$GLOBALS['compression'] = 'none';
$GLOBALS['read_multiply'] = 10;
$GLOBALS['import_type'] = 'Xml';
$GLOBALS['pmaThemeImage'] = 'image';
$GLOBALS['import_handle'] = @fopen($GLOBALS['import_file'], 'r');
//separator for csv
$GLOBALS['csv_terminated'] = "\r";
$GLOBALS['csv_enclosed'] = '"';
$GLOBALS['csv_escaped'] = '"';
$GLOBALS['csv_new_line'] = 'auto';
//$_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;
}