php PMA_getJsValue类(方法)实例源码

下面列出了php PMA_getJsValue 类(方法)源码代码实例,从而了解它的用法。

作者:kfjihailon    项目:phpMyAdmi   
/**
  * Test for PMA_getJsValue
  *
  * @param string $key      Key
  * @param string $value    Value
  * @param string $expected Expected output
  *
  * @dataProvider variables
  *
  * @return void
  */
 public function testFormat($key, $value, $expected)
 {
     $this->assertEquals($expected, PMA_getJsValue($key, $value));
     $this->assertEquals('foo = 100', PMA_getJsValue('foo', '100', false));
     $array = array('1', '2', '3');
     $this->assertEquals("foo = [\"1\",\"2\",\"3\",];\n", PMA_getJsValue('foo', $array));
 }

作者:JohanArmand    项目:MaxCorpMedi   
/**
 * Adds JS code snippet for variable assignment
 * to be displayed by the PMA_Response class.
 *
 * @param string $key    Name of value to set
 * @param mixed  $value  Value to set, can be either string or array of strings
 * @param bool   $escape Whether to escape value or keep it as it is
 *                       (for inclusion of js code)
 *
 * @return void
 */
function PMA_addJSVar($key, $value, $escape = true)
{
    PMA_addJSCode(PMA_getJsValue($key, $value, $escape));
}

作者:Stony-Brook-Universit    项目:doitsb   
/**
 * Prints an javascript assignment with proper escaping of a value
 * and support for assigning array of strings.
 *
 * @param string $key   Name of value to set
 * @param mixed  $value Value to set, can be either string or array of strings
 *
 * @return void
 */
function PMA_printJsValue($key, $value)
{
    echo PMA_getJsValue($key, $value);
}

作者:nicokaise    项目:phpmyadmi   
/**
  * @dataProvider variables
  */
 public function testFormat($key, $value, $expected)
 {
     $this->assertEquals($expected, PMA_getJsValue($key, $value));
 }


问题


面经


文章

微信
公众号

扫码关注公众号