Methods summary
public static
string
|
#
full( )
Get the full URI including the query string.
Get the full URI including the query string.
Returns
string
|
public static
string
|
#
current( )
Get the full URL for the current request.
Get the full URL for the current request.
Returns
string
|
public static
string
|
#
home( boolean $https = null )
Get the URL for the application root.
Get the URL for the application root.
Parameters
Returns
string
|
public static
string
|
#
base( )
Get the base URL of the application.
Get the base URL of the application.
Returns
string
|
public static
string
|
#
to( string $url = '', boolean $https = null, boolean $asset = false, boolean $locale = true )
Generate an application URL.
Generate an application URL.
$url = URL::to('user/profile');
$url = URL::to('user/profile', true);
Parameters
- $url
string $url
- $https
boolean $https
- $asset
boolean $asset
- $locale
boolean $locale
Returns
string
|
public static
string
|
#
to_secure( string $url = '' )
Generate an application URL with HTTPS.
Generate an application URL with HTTPS.
Parameters
Returns
string
|
public static
string
|
#
to_action( string $action, array $parameters = array() )
Generate a URL to a controller action.
Generate a URL to a controller action.
$url = URL::to_action('user@index');
$url = URL::to_action('user@profile', array('taylor'));
Parameters
- $action
string $action
- $parameters
array $parameters
Returns
string
|
protected static
string
|
#
explicit( array $route, string $action, array $parameters )
Generate an action URL from a route definition
Generate an action URL from a route definition
Parameters
- $route
array $route
- $action
string $action
- $parameters
array $parameters
Returns
string
|
protected static
string
|
#
convention( string $action, array $parameters )
Generate an action URI by convention.
Generate an action URI by convention.
Parameters
- $action
string $action
- $parameters
array $parameters
Returns
string
|
public static
string
|
#
to_asset( string $url, boolean $https = null )
Generate an application URL to an asset.
Generate an application URL to an asset.
Parameters
- $url
string $url
- $https
boolean $https
Returns
string
|
public static
string
|
#
to_route( string $name, array $parameters = array() )
Generate a URL from a route name.
Generate a URL from a route name.
$url = URL::to_route('profile');
$url = URL::to_route('profile', array($username));
Parameters
- $name
string $name
- $parameters
array $parameters
Returns
string
|
public static
string
|
#
to_language( string $language, boolean $reset = false )
Get the URL to switch language, keeping the current page or not
Get the URL to switch language, keeping the current page or not
Parameters
- $language
string $language The new language
- $reset
boolean $reset Whether navigation should be reset
Returns
string An URL
|
public static
string
|
#
transpose( string $uri, array $parameters )
Substitute the parameters in a given URI.
Substitute the parameters in a given URI.
Parameters
- $uri
string $uri
- $parameters
array $parameters
Returns
string
|
public static
boolean
|
#
valid( string $url )
Determine if the given URL is valid.
Determine if the given URL is valid.
Parameters
Returns
boolean
|