Packages » Package freddy » Class FreddyLocationRewriter

Class FreddyLocationRewriter

Declaration:
<? class FreddyLocationRewriter implements LocationRewriter ?>

Implemented Interfaces:
LocationRewriter

Methods:
  • decode()
    This method is called from Request::parseHTTP() method to decode the rewritten URLs as received from the remote user. This method should decode URLs only if the web server doesn't do this itself; owherwise this method can safely return the $_GET array.

    Note: this method is called for GET requests only as there is no way to rewrite POST requests
  • rewrite()
    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.