本文整理汇总了PHP中PMA_TRI_setGlobals函数的典型用法代码示例。如果您正苦于以下问题:PHP PMA_TRI_setGlobals函数的具体用法?PHP PMA_TRI_setGlobals怎么用?PHP PMA_TRI_setGlobals使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了PMA_TRI_setGlobals函数的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: testgetQueryFromRequest
/**
* Test for PMA_TRI_getQueryFromRequest
*
* @param string $definer Definer
* @param string $name Name
* @param string $timing Timing
* @param string $event Event
* @param string $table Table
* @param string $definition Definition
* @param string $query Query
* @param string $num_err Error number
*
* @return void
*
* @dataProvider provider
*/
public function testgetQueryFromRequest($definer, $name, $timing, $event, $table, $definition, $query, $num_err)
{
global $_REQUEST, $errors;
$errors = array();
PMA_TRI_setGlobals();
$_REQUEST['item_definer'] = $definer;
$_REQUEST['item_name'] = $name;
$_REQUEST['item_timing'] = $timing;
$_REQUEST['item_event'] = $event;
$_REQUEST['item_table'] = $table;
$_REQUEST['item_definition'] = $definition;
$this->assertEquals($query, PMA_TRI_getQueryFromRequest());
$this->assertEquals($num_err, count($errors));
}
示例2: PMA_TRI_main
/**
* Main function for the triggers functionality
*
* @return void
*/
function PMA_TRI_main()
{
global $db, $table;
PMA_TRI_setGlobals();
/**
* Process all requests
*/
PMA_TRI_handleEditor();
PMA_TRI_handleExport();
/**
* Display a list of available triggers
*/
$items = PMA_DBI_get_triggers($db, $table);
echo PMA_RTE_getList('trigger', $items);
/**
* Display a link for adding a new trigger,
* if the user has the necessary privileges
*/
echo PMA_TRI_getFooterLinks();
}
示例3: testgetEditorForm_ajax
/**
* Test for PMA_TRI_getEditorForm
*
* @param string $data Data for trigger
* @param array $matcher Matcher
*
* @return void
*
* @dataProvider provider_ajax
*/
public function testgetEditorForm_ajax($data, $matcher)
{
$GLOBALS['is_ajax_request'] = true;
PMA_TRI_setGlobals();
$this->assertTag($matcher, PMA_TRI_getEditorForm('edit', $data), '', false);
}
示例4: testGetEditorFormAjax
/**
* Test for PMA_TRI_getEditorForm
*
* @param array $data Data for trigger
* @param array $matcher Matcher
*
* @return void
*
* @dataProvider providerAjax
*/
public function testGetEditorFormAjax($data, $matcher)
{
$GLOBALS['is_ajax_request'] = true;
$GLOBALS['server'] = 1;
PMA_TRI_setGlobals();
$this->assertContains($matcher, PMA_TRI_getEditorForm('edit', $data));
}
示例5: testGetEditorFormAjax
/**
* Test for PMA_TRI_getEditorForm
*
* @param array $data Data for trigger
* @param array $matcher Matcher
*
* @return void
*
* @dataProvider providerAjax
*/
public function testGetEditorFormAjax($data, $matcher)
{
$GLOBALS['server'] = 1;
Response::getInstance()->setAjax(true);
PMA_TRI_setGlobals();
$this->assertContains(
$matcher,
PMA_TRI_getEditorForm('edit', $data)
);
Response::getInstance()->setAjax(false);
}