本文整理汇总了PHP中Gdn_Url::request方法的典型用法代码示例。如果您正苦于以下问题:PHP Gdn_Url::request方法的具体用法?PHP Gdn_Url::request怎么用?PHP Gdn_Url::request使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Gdn_Url
的用法示例。
在下文中一共展示了Gdn_Url::request方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: debug
* default config and the general and error functions. More control is possible
* here, but some things have already been loaded and are immutable.
*/
if (file_exists(PATH_CONF . '/bootstrap.early.php')) {
require_once PATH_CONF . '/bootstrap.early.php';
}
Gdn::config()->caching(true);
debug(c('Debug', false));
setHandlers();
/**
* Installer Redirect
*
* If Garden is not yet installed, force the request to /dashboard/setup and
* begin installation.
*/
if (Gdn::config('Garden.Installed', false) === false && strpos(Gdn_Url::request(), 'setup') === false) {
safeHeader('Location: ' . Gdn::request()->url('dashboard/setup', true));
exit;
}
/**
* Extension Managers
*
* Now load the Addon, Application, Theme and Plugin managers into the Factory, and
* process the application-specific configuration defaults.
*/
// ApplicationManager
Gdn::factoryInstall(Gdn::AliasApplicationManager, 'Gdn_ApplicationManager', '', Gdn::FactorySingleton, [Gdn::addonManager()]);
// ThemeManager
Gdn::factoryInstall(Gdn::AliasThemeManager, 'Gdn_ThemeManager', '', Gdn::FactorySingleton, [Gdn::addonManager()]);
// PluginManager
Gdn::factoryInstall(Gdn::AliasPluginManager, 'Gdn_PluginManager', '', Gdn::FactorySingleton, [Gdn::addonManager()]);
示例2: isActive
/**
* Checks whether the current request url matches an item's link url.
*
* @param array $item The item to check.
* @return bool Whether the current request url matches an item's link url.
*/
protected function isActive($item)
{
if (empty($this->highlightRoute)) {
$highlightRoute = Gdn_Url::request(true);
} else {
$highlightRoute = url($this->highlightRoute);
}
return val('url', $item) && trim(url(val('url', $item)), '/') == trim($highlightRoute, '/');
}
示例3: isActive
/**
* Checks whether the current request url matches an item's link url.
*
* @param array $item The item to check.
* @return bool Whether the current request url matches an item's link url.
*/
public function isActive($item)
{
$highlightRoute = Gdn_Url::request();
$highlightUrl = Url($highlightRoute);
return val('linkUrl', $item) && Url(val('linkUrl', $item)) == $highlightUrl;
}