include 'Url.php';
use Prototypeblocks\Url;
$currentUrl = Url::current();
// $currentUrl contains current page URL for example: http://local.prototypeblocks.com/example/
$previousUrl = Url::previous();
// $previousUrl contains previous page URL (refferer)
$isSecure = Url::isHttps();
// $isSecure is a boolean with weither or not the current page is requested over HTTPS
$redirectTo = 'http://www.prototypeblocks.com/';
Url::isHttps($redirectTo);
// Will redirect (header location) to given page, in this case 'http://www.prototypeblocks.com/'