aboutgoods/url
Composer 安装命令:
composer require aboutgoods/url
包简介
Parse, build and manipulate URL's
README 文档
README
A simple package to deal with URL's in your applications.
Retrieve parts of the URL:
use Spatie\Url\Url;
$url = Url::fromString('https://spatie.be/opensource');
echo $url->getScheme(); // 'https'
echo $url->getHost(); // 'spatie.be'
echo $url->getPath(); // '/opensource'
Transform any part of the URL (the Url class is immutable):
$url = Url::fromString('https://spatie.be/opensource');
echo $url->withHost('github.com')->withPath('spatie');
// 'https://github.com/spatie'
Retrieve and transform query parameters:
$url = Url::fromString('https://spatie.be/opensource?utm_source=github&utm_campaign=packages');
echo $url->getQuery(); // 'utm_source=github&utm_campaign=packages'
echo $url->getQueryParameter('utm_source'); // 'github'
echo $url->withoutQueryParameter('utm_campaign'); // 'https://spatie.be/opensource?utm_source=github'
Retrieve path segments:
$url = Url::fromString('https://spatie.be/opensource/laravel');
echo $url->getSegment(1); // 'opensource'
echo $url->getSegment(2); // 'laravel'
Implements PSR-7's UriInterface interface:
class Url implements UriInterface { /* ... */ }
The league/uri is a more powerful package than this one. The main reason this package exists, is because the alternatives requires non-standard php extensions. If you're dealing with special character encodings or need bulletproof validation, you're definitely better off using league/uri.
Spatie is a webdesign agency based in Antwerp, Belgium. You'll find an overview of all our open source projects on our website.
Installation
You can install the package via composer:
composer require spatie/url
Usage
Usage is pretty straightforward. Check out the code examples at the top of this readme.
Changelog
Please see CHANGELOG for more information what has changed recently.
Testing
composer test
Contributing
Please see CONTRIBUTING for details.
Security
If you discover any security related issues, please email freek@spatie.be instead of using the issue tracker.
Postcardware
You're free to use this package, but if it makes it to your production environment we highly appreciate you sending us a postcard from your hometown, mentioning which of our package(s) you are using.
Our address is: Spatie, Samberstraat 69D, 2060 Antwerp, Belgium.
We publish all received postcards on our company website.
Credits
Support us
Spatie is a webdesign agency based in Antwerp, Belgium. You'll find an overview of all our open source projects on our website.
Does your business depend on our contributions? Reach out and support us on Patreon. All pledges will be dedicated to allocating workforce on maintenance and new awesome stuff.
License
The MIT License (MIT). Please see License File for more information.
aboutgoods/url 适用场景与选型建议
aboutgoods/url 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 544 次下载、GitHub Stars 达 0, 最近一次更新时间为 2019 年 03 月 28 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「url」 「spatie」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 aboutgoods/url 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 aboutgoods/url 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 aboutgoods/url 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Easy URL rewrites in your Laravel application
Receive webhooks in Laravel apps
A Laravel helper to detect if the current route/path is active.
Provides a service and twig extension for getting short urls like http://your.host/~short
Easily optimize images using PHP
Store your application settings
统计信息
- 总下载量: 544
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 2
- 依赖项目数: 1
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2019-03-28