Maslosoft Framework Logo Maslosoft Framework Documentation
Flexible Application Foundation

Creating URLs


To create relative url use Url class by creating and echo'ing Url object, or by calling create method. Example below will output urls to sign in page.

echo new Url('uac/auth/login');
echo PHP_EOL;
echo Url::create('uac/auth/login');

Absolute URLs

Usage is exacly the same as with relative URLs, except that AbsoluteUrl class should be used. Example below will output absolute URLs to the sign in page.
echo new AbsoluteUrl('uac/auth/login');
echo PHP_EOL;
echo AbsoluteUrl::create('uac/auth/login');