定制 kusabi/uri 二次开发

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

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

kusabi/uri

Composer 安装命令:

composer require kusabi/uri

包简介

A PSR-7 and PSR-17 conforming uri library for PHP

README 文档

README

Tests codecov Licence Badge Release Badge Tag Badge Issues Badge Code Size

An implementation of a PSR-7 & PSR-17 conforming Uri library

Installation

Installation is simple using composer.

composer require kusabi/uri

Or simply add it to your composer.json file

{
    "require": {
        "kusabi/uri": "^1.0"
    }
}

Using the Uri class

The Uri class is a very basic wrapper around a Uri string.

use Kusabi\Uri\Uri;

// Instantiate a Uri instance
$uri = new Uri('https://user:pass@www.my-site.com:8080/users/22?filter=name#bottom');

// Fetch the properties of the Uri instance
echo $uri->getScheme();
echo $uri->getAuthority();
echo $uri->getUserInfo();
echo $uri->getHost();
echo $uri->getPort();
echo $uri->getPath();
echo $uri->getQuery();
echo $uri->getFragment();

Using the Uri factory

The Uri factory can be used to create the Uri instance too.

use Kusabi\Uri\UriFactory;

// Instantiate a Uri instance
$factory = new UriFactory();
$uri = $factory->createUri('https://user:pass@www.my-site.com:8080/users/22?filter=name#bottom');

// Fetch the properties of the Uri instance
echo $uri->getScheme();
echo $uri->getAuthority();
echo $uri->getUserInfo();
echo $uri->getHost();
echo $uri->getPort();
echo $uri->getPath();
echo $uri->getQuery();
echo $uri->getFragment();

统计信息

  • 总下载量: 9
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 5
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: mit
  • 更新时间: 2019-07-12

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固