URL Builder Class

This class allows you to build URLs using an easy object oriented interface.

Example:

// My blog

$url = new sb_url;
$url -> setDomain(’www.sambarrow.com’);

echo $url -> generate() . ‘<br />’;

// My blog archives

$url -> setPath(’/archives’);

echo $url -> generate() . ‘<br />’;

// My blog (using SSL)

$url -> setPath(’/');
$url -> setProtocol(sb_protocol_https);

echo $url -> generate() . ‘<br />’;

Download:

URL Builder Class

Leave a Reply