Do not work with the path, params and query properties directly, because this
will not work in PHP 5.2.0 (that is, do not set/get $url->query[0], because a
notice will be thrown: "Notice: Indirect modification of overloaded property
ezcUrl::$query has no effect"). Instead, use the following methods.
By using the ezcUrlConfiguration class, you can specify a custom configuration
that can be used to parse urls. The properties you can set in objects of this
class are the default base directory, default script name (eg. index.php)
(which will be hidden when building the url by default, but can be displayed
by calling buildUrl( true )), delimiters for unordered parameter names and
names for accepted parameters.
A URL is assumed to be of this form:
scheme://host/basedir/script/ordered_parameters/unordered_parameters
Example:
http://example.com/mydir/index.php/groups/Games/Adventure/Adult/(game)/Larry/7
Where:
scheme = "http"
host = "example.com"
basedir = "mydir"
script = "index.php"
ordered parameters = "groups", "Games", "Adventure", "Adult"
unordered parameters = array( "Larry", "7" )
When creating a configuration with ordered parameters, those parameters are
required to be present in the parsed URL, in the same number as the
configuration states. Having a different number of ordered parameters in the
parsed URL will lead to wrong values assigned to the unordered parameters (if
any follow the ordered parameters).
Working with a variable number of ordered parameters is explained in the
Changing a url configuration dynamically section.