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


PHP JRouter::getVar方法代码示例

本文整理汇总了PHP中JRouter::getVar方法的典型用法代码示例。如果您正苦于以下问题:PHP JRouter::getVar方法的具体用法?PHP JRouter::getVar怎么用?PHP JRouter::getVar使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在JRouter的用法示例。


在下文中一共展示了JRouter::getVar方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: logoutRouterRule

 /**
  * Router callback rule for appending the SSO logout variable to the URL.
  *
  * @param   JRouter  $router  Reference to the router object.
  * @param   JURI     $uri     Reference to the JURI object.
  *
  * @return  void
  *
  * @since   2.0
  */
 public static function logoutRouterRule(JRouter $router, JURI $uri)
 {
     $uri->setVar($router->getVar('ssologoutkey'), $router->getVar('ssologoutval'));
 }
开发者ID:philbertphotos,项目名称:JMapMyLDAP,代码行数:14,代码来源:sso.php

示例2: testSingleVariablesCanBeAddedAndOptionallyReplaceExistingVariables

 /**
  * @param   array   $preset   An associative array with variables
  * @param   string  $var      The name of the variable
  * @param   mixed   $value    The value of the variable
  * @param   boolean $create   If True, the variable will be created if it doesn't exist yet
  * @param   string  $expected Expected return value
  *
  * @dataProvider  casesVariables
  * @since         3.1
  */
 public function testSingleVariablesCanBeAddedAndOptionallyReplaceExistingVariables($preset, $var, $value, $create, $expected)
 {
     $this->object->setVars($preset, false);
     $this->object->setVar($var, $value, $create);
     $this->assertEquals($expected, $this->object->getVar($var));
 }
开发者ID:Rai-Ka,项目名称:joomla-cms,代码行数:16,代码来源:JRouterTest.php

示例3: testSetVar

 /**
  * Tests the setVar method
  *
  * @param   array    $vars      An associative array with variables
  * @param   string   $var       The name of the variable
  * @param   mixed    $value     The value of the variable
  * @param   boolean  $create    If True, the variable will be created if it doesn't exist yet
  * @param   string   $expected  Expected return value
  *
  * @return  void
  *
  * @dataProvider  casesSetVar
  * @since         3.1
  */
 public function testSetVar($vars, $var, $value, $create, $expected)
 {
     $this->object->setVars($vars, false);
     $this->object->setVar($var, $value, $create);
     $this->assertEquals($this->object->getVar($var), $expected, __METHOD__ . ':' . __LINE__ . ': value is not expected');
 }
开发者ID:shoffmann52,项目名称:install-from-web-server,代码行数:20,代码来源:JRouterTest.php


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