Packages » Package freeform » Class LocationRewriter » Method rewrite

Method LocationRewriter::rewrite

Declaration:
<? abstract public static string rewrite(Location $l?>

Declared in:
LocationRewriter

Description:
This method will be called by the Location::toURL() to return the rewritten URL, as it will appear in the browser. This method should return the fully-qualified URL, including protocol, host port and path of the rewritten URL.
Note: this method cannot call the Location::toURL() method; to retrieve the default URL of a location, the Location::rewrite() static method should be called instead.


Parameters:
  • Location $l
    the Location object to rewrite

Returns:
string the rewritten URL string