php-dto/uri
最新稳定版本:0.1.0
Composer 安装命令:
composer require php-dto/uri
包简介
Immutable uri object with validation and helpful methods
关键字:
README 文档
README
Installation
composer require php-dto/uri
Usage
<?php $uri = new \PhpDto\Uri\Uri('https://foo@test.example.com:42?query#'); echo $uri->get(); //will print https://foo@test.example.com:42?query# echo (string) $uri; //will print https://foo@test.example.com:42?query# print_r($uri->getComponents()); //will print array( 'scheme' => 'https', // the URI scheme component 'user' => 'foo', // the URI user component 'pass' => null, // the URI pass component 'host' => 'test.example.com', // the URI host component 'port' => 42, // the URI port component 'path' => '', // the URI path component 'query' => 'query', // the URI query component 'fragment' => '', // the URI fragment component ); new \PhpDto\Uri\Uri('http://test.com', ['https',]); //will throw \PhpDto\Uri\Exception\UriException (allows only `https` scheme)
统计信息
- 总下载量: 2.87k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 2
- 推荐数: 0
其他信息
- 授权协议: BSD-3-Clause
- 更新时间: 2022-11-10