Properties
Properties existing in the Solar_Uri_Action
class.
Public
$format
(string) The dot-format extension of the last path element (for example, the "rss" in "feed.rss").
Inherited from Solar_Uri.
$fragment
(string) The fragment portion (for example, the "foo" in "#foo").
Inherited from Solar_Uri.
Protected
$_Solar_Uri_Action
(array) Default configuration values.
$_config
(array) Collection point for configuration values.
Inherited from Solar_Base.
Note that you do not define config defaults in $_config directly.
<?php
// DO NOT DO THIS
protected $_config = array(
'foo' => 'bar',
'baz' => 'dib',
);
Instead, define config defaults in a protected property named for the class, withan underscore prefix.
For exmple, a "Vendor_Class_Name" class would define the default config array in "$_Vendor_Class_Name". This convention lets child classes inherit parent config keys and values.
<?php
// DO THIS INSTEAD
protected $_Vendor_Class_Name = array(
'foo' => 'bar',
'baz' => 'dib',
);
$_encode_path
(array) Url-encode only these characters in path elements.
Inherited from Solar_Uri.
Characters are ' ' (space), '/', '?', '&', and '#'.
$_query
(array) Contents of virtual $query property.
Inherited from Solar_Uri.
Public access is allowed via __get() with $query.
If you access this property, Solar_Uri treats Solar_Uri::$query as authoritative, not the internal Solar_Uri::$_query_str. If the original query string did not follow PHP's query string rules, you may lose data; however, for all other URIs this change should be transparent. If you are emulating forms, be sure to set $query to an empty array before adding elements.
Why do things this way? The reason is that parse_str() and http_build_query() may not return the query string exactly the way it was set in the first place. E.g., "?foo&bar" will come back as "?foo=&bar=", which may or may not be expected.
So instead, we do not parse the query string to an array until the user attempts to manipulate the query elements. This guarantees that if you don't examine or modify the query, you will get back exactly what you put in.
If you examine or modify the query elements, though, that will invoke parse_str() and http_build_query(), so you may not get back exactly what you set in the first place. In almost every case this won't matter.
Many thanks to Edward Z. Yang for this implementation.
$_query_str
(string) Internal "original" query string; if you examine or modify the $query virtual property, this property is ignored when building the URI.
Inherited from Solar_Uri.
Private
None.