本文整理汇总了PHP中PMA_EVN_setGlobals函数的典型用法代码示例。如果您正苦于以下问题:PHP PMA_EVN_setGlobals函数的具体用法?PHP PMA_EVN_setGlobals怎么用?PHP PMA_EVN_setGlobals使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了PMA_EVN_setGlobals函数的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: testgetQueryFromRequest
/**
* Test for PMA_EVN_getQueryFromRequest
*
* @param array $request Request
* @param string $query Query
* @param array $num_err Error number
*
* @return void
*
* @dataProvider provider
*/
public function testgetQueryFromRequest($request, $query, $num_err)
{
global $_REQUEST, $errors;
$errors = array();
PMA_EVN_setGlobals();
unset($_REQUEST);
$_REQUEST = $request;
$this->assertEquals($query, PMA_EVN_getQueryFromRequest());
$this->assertEquals($num_err, count($errors));
}
示例2: testgetQueryFromRequest
/**
* Test for PMA_EVN_getQueryFromRequest
*
* @param array $request Request
* @param string $query Query
* @param array $num_err Error number
*
* @return void
*
* @dataProvider provider
*/
public function testgetQueryFromRequest($request, $query, $num_err)
{
global $_REQUEST, $errors;
$errors = array();
PMA_EVN_setGlobals();
unset($_REQUEST);
$_REQUEST = $request;
$dbi = $this->getMockBuilder('PMA\\libraries\\DatabaseInterface')->disableOriginalConstructor()->getMock();
$dbi->expects($this->any())->method('escapeString')->will($this->returnArgument(0));
$GLOBALS['dbi'] = $dbi;
$this->assertEquals($query, PMA_EVN_getQueryFromRequest());
$this->assertEquals($num_err, count($errors));
}
示例3: PMA_EVN_main
/**
* Main function for the events functionality
*
* @return void
*/
function PMA_EVN_main()
{
global $db;
PMA_EVN_setGlobals();
/**
* Process all requests
*/
PMA_EVN_handleEditor();
PMA_EVN_handleExport();
/**
* Display a list of available events
*/
$items = $GLOBALS['dbi']->getEvents($db);
echo PMA_RTE_getList('event', $items);
/**
* Display a link for adding a new event, if
* the user has the privileges and a link to
* toggle the state of the event scheduler.
*/
echo PMA_EVN_getFooterLinks();
}
示例4: PMA_EVN_main
/**
* Main function for the events functionality
*/
function PMA_EVN_main()
{
global $db;
PMA_EVN_setGlobals();
/**
* Process all requests
*/
PMA_EVN_handleEditor();
PMA_EVN_handleExport();
/**
* Display a list of available events
*/
$columns = "`EVENT_NAME`, `EVENT_TYPE`, `STATUS`";
$where = "EVENT_SCHEMA='" . PMA_sqlAddSlashes($db) . "'";
$query = "SELECT {$columns} FROM `INFORMATION_SCHEMA`.`EVENTS` " . "WHERE {$where} ORDER BY `EVENT_NAME` ASC;";
$items = PMA_DBI_fetch_result($query);
echo PMA_RTE_getList('event', $items);
/**
* Display a link for adding a new event, if
* the user has the privileges and a link to
* toggle the state of the event scheduler.
*/
echo PMA_EVN_getFooterLinks();
}
示例5: testgetEditorForm_ajax
/**
* Test for PMA_EVN_getEditorForm
*
* @param array $data Data for routine
* @param array $matcher Matcher
*
* @return void
*
* @dataProvider provider_ajax
*/
public function testgetEditorForm_ajax($data, $matcher)
{
$GLOBALS['is_ajax_request'] = true;
PMA_EVN_setGlobals();
$this->assertTag($matcher, PMA_EVN_getEditorForm('edit', 'change', $data), '', false);
}
示例6: testgetEditorFormAjax
/**
* Test for PMA_EVN_getEditorForm
*
* @param array $data Data for routine
* @param array $matcher Matcher
*
* @return void
*
* @dataProvider providerAjax
*/
public function testgetEditorFormAjax($data, $matcher)
{
Response::getInstance()->setAjax(true);
PMA_EVN_setGlobals();
$this->assertContains(
$matcher,
PMA_EVN_getEditorForm('edit', 'change', $data)
);
Response::getInstance()->setAjax(false);
}