duy/url_helper
Composer 安装命令:
composer require duy/url_helper
包简介
support some function to manuplation with url
README 文档
README
Introduce
This package supports manipulation with url:
- Check url.
- Merge an url with a path.
- Parse an url to get partials such as: scheme, host, port.
Additional, this package also provide some simple test codes in order to assert running of source is correct. All codes for testing is placed in tests directory.
Install
Install Composer
First of all, you need to install Composer in this tutorial.
Install package duy/url_helper
-
Create an empty project.
-
Open command line in your device and move to your root directory of project, type the follow commands:
composer require duy/url_helper
Usage
Create an instance of UrlHelper
$urlHelper = new UrlHelper();
Check an url
$urlHelper->isValidUrl($urlToCheck);
//return true if $urlToCheck is a valid url, contraty return false
Merge an url to a path
$urlHelper->mergeUrl($baseUrl, $path);
//return a string of url if function runs successful, contrary return false
Parse an url
$urlHelper->parseUrl($url);
//return an array of partials in the url if the url is valid, contrary return false
统计信息
- 总下载量: 16
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: Unknown
- 更新时间: 2017-11-18