Skip to content
This repository has been archived by the owner on Nov 23, 2023. It is now read-only.

rdgout/url-parse

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Installation

Simply run composer install to install phpunit.
See 'Testing' for instructions on how to execute the tests.

Usage

Usage of the class is simple:

$url = new Url('http://www.google.com')

Now you can pick out various parts of the url with the getters the class provides.

$url = new Url('http://www.google.com')

$scheme = $url->getScheme(); // http
$host = $url->getHost(); // www.google.com

Want to get the parsed URL as a string? Simply use (string)$url to get http://www.google.com

Testing

Run the following command to initiate the test

./vendor/bin/phpunit --bootstrap vendor/autoload.php tests/UrlTest

About

A simple url parser with some tests

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages