定制 baraja-core/url 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

baraja-core/url

最新稳定版本:v1.1.5

Composer 安装命令:

composer require baraja-core/url

包简介

Simple URL manager.

README 文档

README

Integrity check

Simple manager to get parts of the current URL. URL resolving is done in a secure way.

📦 Installation

It's best to use Composer for installation, and you can also find the package on Packagist and GitHub.

To install, simply use the command:

$ composer require baraja-core/url

You can use the package manually by creating an instance of the internal classes, or register a DIC extension to link the services directly to the Nette Framework.

How to use

An easy-to-use library for obtaining and managing current URLs.

You will get the current URL:

echo \Baraja\Url\Url::get()->getCurrentUrl();

A base URL:

echo \Baraja\Url\Url::get()->getBaseUrl();

Or relative URL:

// return with query parameters (if used)
echo \Baraja\Url\Url::get()->getRelativeUrl();

// return only path
echo \Baraja\Url\Url::get()->getRelativeUrl(false);

Nette Url or Script Url can also be obtained for robust work with URL parts:

$netteUrl = \Baraja\Url\Url::get()->getNetteUrl();

echo $netteUrl->getDomain();
echo $netteUrl->getPort();
echo $netteUrl->getQuery();

And many other getters, see the documentation for more.

📄 License

baraja-core/url is licensed under the MIT license. See the LICENSE file for more details.

统计信息

  • 总下载量: 376.04k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 3
  • 点击次数: 0
  • 依赖项目数: 20
  • 推荐数: 0

GitHub 信息

  • Stars: 3
  • Watchers: 1
  • Forks: 2
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2021-01-20