Skip to content
This repository was archived by the owner on Sep 19, 2023. It is now read-only.

gwilym/php-url

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

gwilym/url

Value object representing a URL. Makes parsing, formatting and handing around URLs in a PHP app somewhat cleaner in some situations.

Couldn't think of a clever vendor name, so I used my own odd one.

Installation

Use composer to bring it into your project, then follow the usage examples.

Usage

It's intended to very simply wrap the components of a URL:

$string = 'http://example.com';
$object = Gwilym\Url::parse($string);
$string = Gwilym\Url::format($object);

Additionally:

$object = Gwilym\Url::parse('http://example.com');
echo $object->host; // example.com

About

A simple wrapper for URLs in PHP.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages