gpt4 book ai didi

php - JRoute::_() - 函数在哪里?在 joomla

转载 作者:可可西里 更新时间:2023-11-01 00:50:01 24 4
gpt4 key购买 nike

为什么JRoute 类中没有带_ 的方法,而我们使用它??,JRoute 类只扩展了JObjects,而_ 函数在哪里?在 joomla

最佳答案

您使用的是什么版本?如果你去to the API page ,你有这个源代码:

class JRoute
{
/**
* Translates an internal Joomla URL to a humanly readible URL.
*
* @param string $url Absolute or Relative URI to Joomla resource.
* @param boolean $xhtml Replace & by & for XML compilance.
* @param integer $ssl Secure state for the resolved URI.
* 1: Make URI secure using global secure site URI.
* 0: Leave URI in the same secure state as it was passed to the function.
* -1: Make URI unsecure using the global unsecure site URI.
*
* @return The translated humanly readible URL.
*
* @since 11.1
*/
public static function _($url, $xhtml = true, $ssl = null)
{
// Get the router.
$app = JFactory::getApplication();
$router = $app->getRouter();

// Make sure that we have our router
if (!$router)
{

所以该方法就在那里,从一开始就定义了(或多或少的第 33 行)。
在此处查看该方法的文档:http://api.joomla.org/Joomla-Platform/JRoute.html#method_

关于php - JRoute::_() - 函数在哪里?在 joomla,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9636882/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com