本文整理匯總了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);
}