talesoft/tale-uri
Composer 安装命令:
composer require talesoft/tale-uri
包简介
A basic, lightweight PSR-7 and PSR-17 compatible URI implementation
关键字:
README 文档
README
Tale Uri
What is Tale Uri?
This is a basic and lightweight implementation of the
Psr\Http\Message\UriInterface and the Psr\Http\Message\UriFactoryInterface.
It doesn't add any extra methods, they are straight and direct implementations without any overhead.
It's useful in cases where you simply just want URI abstraction,
but not a full HTTP layer with it. It's also useful for library
authors for testing with dependencies on Psr\Http\Message\UriInterface
Installation
composer req talesoft/tale-uri
Usage
Check out the Functions File to see all things this library does.
Parse and modify URIs easily
use function Tale\uri_parse; $uri = uri_parse('https://google.com/search'); //$uri is a strict implementation of PSR-7's UriInterface echo $uri->getScheme(); //"https" echo $uri->getHost(); "google.com" echo $uri->getPath(); //"/search" echo $uri->withHost("talesoft.codes"); "https://talesoft.codes/search"
Create an URI factory for DI containers
use Psr\Http\Message\UriFactoryInterface; use Tale\UriFactory; $container->add(UriFactory::class); //... $uriFactory = $container->get(UriFactoryInterface::class); $uri = $uriFactory->createUri('https://example.com#test'); echo $uri->getFragment(); //"test"
talesoft/tale-uri 适用场景与选型建议
talesoft/tale-uri 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 18 次下载、GitHub Stars 达 1, 最近一次更新时间为 2019 年 01 月 22 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「uri」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 talesoft/tale-uri 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 talesoft/tale-uri 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 talesoft/tale-uri 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Safely namespaced guzzle psr7 for WP2Static
uri signer with expiration option
Zend Framework 1 Uri package
PHP Library to deal with uris.
Updates the slug of a page automatically and logically when renaming a page or moving it around.
统计信息
- 总下载量: 18
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 10
- 依赖项目数: 1
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2019-01-22