当前位置: 首页>>代码示例>>PHP>>正文


PHP PMA_EVN_setGlobals函数代码示例

本文整理汇总了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));
 }
开发者ID:kfjihailong,项目名称:phpMyAdmin,代码行数:21,代码来源:PMA_EVN_getQueryFromRequest_test.php

示例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));
 }
开发者ID:phpmyadmin,项目名称:phpmyadmin,代码行数:24,代码来源:PMA_EVN_getQueryFromRequest_test.php

示例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();
}
开发者ID:rclakmal,项目名称:phpmyadmin,代码行数:26,代码来源:rte_events.lib.php

示例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();
}
开发者ID:AmberWish,项目名称:laba_web,代码行数:27,代码来源:rte_events.lib.php

示例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);
 }
开发者ID:kfjihailong,项目名称:phpMyAdmin,代码行数:16,代码来源:PMA_EVN_getEditorForm_test.php

示例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);
 }
开发者ID:nijel,项目名称:phpmyadmin,代码行数:20,代码来源:PMA_EVN_getEditorForm_test.php


注:本文中的PMA_EVN_setGlobals函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。