Skip to content
master
Switch branches/tags
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
src
 
 
 
 
 
 
 
 
 
 

Sphido / URL

Build Status Latest Stable Version Total Downloads Latest Unstable Version License

Simple and fast PHP library to parse and manipulate with URLs.

Work with URL object

Return current URL

$url = Url::current();
$url->path('whatever');
echo $url; // will made string URL

// or 

echo Url::current('/some/path'); // change current URL with path 

Create URL instance from URL instance:

$url = new Url('http://www.sphido.org/'); // crate instance from string
$url2 = new Url($url); // crate instance from URL instance

Fluent interface for simplify URL changes:

echo Url::current()->path('/a/b/c')->host('sphido.org')->port(123456)->scheme('ftp');

URL function

Function url() it's fastest way how to generate in application URL:

echp url('/path')
echo url('css/main.css');
echo url('css/main.css', ['param' => 'value']);

About

Simple and fast PHP library to parse and manipulate with URLs

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages