承接 transprime-research/php-url 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

transprime-research/php-url

最新稳定版本:1.0.2

Composer 安装命令:

composer require transprime-research/php-url

包简介

Urls in PHP made easy

README 文档

README

Build Status Latest Stable Version Total Downloads Latest Unstable Version Latest Monthly Downloads License

About PHP-URL

This works this way

Do it Like a PRO 🆗

Installation

  • composer require transprime-research/php-url

Quick Usage

Use it like this...

$url = new Url(
    fullDomain: 'http://localhost:8080',
    path: '/api/hello',
    query: ['name' => 'John', 'public' => 'yes'],
);

// Or

$url = Url::make(
    scheme: 'http://',
    domain: 'localhost',
    port: '8080',
    path: '/api/hello',
    query: ['name' => 'John', 'public' => 'yes'],
);


(string) $url; // http://localhost:8080/api/hello?name=John&public=yes
$url->toString(); // http://localhost:8080/api/hello?name=John&public=yes

Other Usages

$url = Url::make()
    ->setScheme('http://')
    ->setDomain('localhost')
    ->setPort('8080')
    ->setPath('/api/hello')
    ->addToQuery('name', 'John')
    ->addToQuery('public', 'yes');

(string) $url; // http://localhost:8080/api/hello?name=John&public=yes

Coming Soon

Api implementation to be decided

Additional Information

See other packages in this series here:

Similar packages

  • luzzardi/php-url
  • martinmdev/php-url
  • simlux/php-url
  • thesmart/php-url

Licence

MIT (See LICENCE file)

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2023-08-21