library rewrite-helper
A library for path of url using mod_rewrite
prob/rewrite-helper
A library for path of url using mod_rewrite
- Thursday, August 25, 2016
- by jongpak
- Repository
- 1 Watchers
- 1 Stars
- 94 Installations
- PHP
- 0 Dependents
- 0 Suggesters
- 0 Forks
- 0 Open issues
- 1 Versions
- 0 % Grown
Prob/Rewrite
A library for path of url using mod_rewrite, (*1)
, (*2)
Usage
basic
<?php
use Prob\Rewrite\Url;
$url = new Url();
$url->setSite('http://somesite.com');
$url->setDispatcher('index.php');
$url->setPath('/post/56');
echo $url->parse(); // http://somesite.com/post/56
echo $url->parse(false); // http://somesite.com/index.php/post/56