|
| __construct () |
| Constructor.
|
|
| _fetch_uri_string () |
| Get the URI String.
|
|
| _set_uri_string ($str) |
| Set the URI String.
|
|
| _filter_uri ($str) |
| Filter segments for malicious characters.
|
|
| _explode_segments () |
| Explode the URI Segments.
|
|
| _reindex_segments () |
| Re-index Segments.
|
|
| segment ($n, $no_result=FALSE) |
| Fetch a URI Segment.
|
|
| rsegment ($n, $no_result=FALSE) |
| Fetch a URI "routed" Segment.
|
|
| uri_to_assoc ($n=3, $default=array()) |
| Generate a key value pair from the URI string.
|
|
| ruri_to_assoc ($n=3, $default=array()) |
| Identical to above only it uses the re-routed segment array.
|
|
| _uri_to_assoc ($n=3, $default=array(), $which='segment') |
| Generate a key value pair from the URI string or Re-routed URI string.
|
|
| assoc_to_uri ($array) |
| Generate a URI string from an associative array.
|
|
| slash_segment ($n, $where='trailing') |
| Fetch a URI Segment and add a trailing slash.
|
|
| slash_rsegment ($n, $where='trailing') |
| Fetch a URI Segment and add a trailing slash.
|
|
| _slash_segment ($n, $where='trailing', $which='segment') |
| Fetch a URI Segment and add a trailing slash - helper function.
|
|
| segment_array () |
| Segment Array.
|
|
| rsegment_array () |
| Routed Segment Array.
|
|
| total_segments () |
| Total number of segments.
|
|
| total_rsegments () |
| Total number of routed segments.
|
|
| uri_string () |
| Fetch the entire URI string.
|
|
| ruri_string () |
| Fetch the entire Re-routed URI string.
|
|
Definition at line 4 of file URI.php.
◆ __construct()
Constructor.
Simply globalizes the $RTR object. The front loads the Router class early on so it's not available normally as other classes are.
@access public
Definition at line 62 of file URI.php.
◆ _detect_uri()
Detects the URI.
This function will detect the URI automatically and fix the query string if necessary.
@access private
- Returns
- string
Definition at line 156 of file URI.php.
◆ _explode_segments()
Explode the URI Segments.
The individual segments will be stored in the $this->segments array.
@access private
- Returns
- void
Definition at line 245 of file URI.php.
◆ _fetch_uri_string()
Get the URI String.
@access private
- Returns
- string
Definition at line 76 of file URI.php.
◆ _filter_uri()
Filter segments for malicious characters.
@access private
- Parameters
-
- Returns
- string
Definition at line 220 of file URI.php.
◆ _parse_cli_args()
Parse cli arguments.
Take each command line argument and assume it is a URI segment.
@access private
- Returns
- string
Definition at line 204 of file URI.php.
◆ _reindex_segments()
Re-index Segments.
This function re-indexes the $this->segment array so that it starts at 1 rather than 0. Doing so makes it simpler to use functions like $this->uri->segment(n) since there is a 1:1 relationship between the segment array and the actual segments.
@access private
- Returns
- void
Definition at line 269 of file URI.php.
◆ _set_uri_string()
Set the URI String.
@access public
- Parameters
-
- Returns
- string
Definition at line 136 of file URI.php.
◆ _slash_segment()
_slash_segment |
( |
|
$n, |
|
|
|
$where = 'trailing' , |
|
|
|
$which = 'segment' |
|
) |
| |
Fetch a URI Segment and add a trailing slash - helper function.
@access private
- Parameters
-
- Returns
- string
Definition at line 487 of file URI.php.
◆ _uri_to_assoc()
_uri_to_assoc |
( |
|
$n = 3 , |
|
|
|
$default = array() , |
|
|
|
$which = 'segment' |
|
) |
| |
Generate a key value pair from the URI string or Re-routed URI string.
@access private
- Parameters
-
integer | the starting segment number |
array | an array of default values |
string | which array we should use |
- Returns
- array
Definition at line 366 of file URI.php.
◆ assoc_to_uri()
Generate a URI string from an associative array.
@access public
- Parameters
-
array | an associative array of key/values |
- Returns
- array
Definition at line 435 of file URI.php.
◆ rsegment()
rsegment |
( |
|
$n, |
|
|
|
$no_result = FALSE |
|
) |
| |
Fetch a URI "routed" Segment.
This function returns the re-routed URI segment (assuming routing rules are used) based on the number provided. If there is no routing this function returns the same result as $this->segment()
@access public
- Parameters
-
- Returns
- string
Definition at line 308 of file URI.php.
◆ rsegment_array()
Routed Segment Array.
@access public
- Returns
- array
Definition at line 522 of file URI.php.
◆ ruri_string()
Fetch the entire Re-routed URI string.
@access public
- Returns
- string
Definition at line 574 of file URI.php.
◆ ruri_to_assoc()
ruri_to_assoc |
( |
|
$n = 3 , |
|
|
|
$default = array() |
|
) |
| |
Identical to above only it uses the re-routed segment array.
@access public
- Parameters
-
integer | the starting segment number |
array | an array of default values |
- Returns
- array
Definition at line 350 of file URI.php.
◆ segment()
segment |
( |
|
$n, |
|
|
|
$no_result = FALSE |
|
) |
| |
Fetch a URI Segment.
This function returns the URI segment based on the number provided.
@access public
- Parameters
-
- Returns
- string
Definition at line 289 of file URI.php.
◆ segment_array()
Segment Array.
@access public
- Returns
- array
Definition at line 509 of file URI.php.
◆ slash_rsegment()
slash_rsegment |
( |
|
$n, |
|
|
|
$where = 'trailing' |
|
) |
| |
Fetch a URI Segment and add a trailing slash.
@access public
- Parameters
-
- Returns
- string
Definition at line 471 of file URI.php.
◆ slash_segment()
slash_segment |
( |
|
$n, |
|
|
|
$where = 'trailing' |
|
) |
| |
Fetch a URI Segment and add a trailing slash.
@access public
- Parameters
-
- Returns
- string
Definition at line 456 of file URI.php.
◆ total_rsegments()
Total number of routed segments.
@access public
- Returns
- integer
Definition at line 548 of file URI.php.
◆ total_segments()
Total number of segments.
@access public
- Returns
- integer
Definition at line 535 of file URI.php.
◆ uri_string()
Fetch the entire URI string.
@access public
- Returns
- string
Definition at line 561 of file URI.php.
◆ uri_to_assoc()
uri_to_assoc |
( |
|
$n = 3 , |
|
|
|
$default = array() |
|
) |
| |
Generate a key value pair from the URI string.
This function generates and associative array of URI data starting at the supplied segment. For example, if this is your URI:
example.com/user/search/name/joe/location/UK/gender/male
You can use this function to generate an array with this prototype:
array ( name => joe location => UK gender => male )
@access public
- Parameters
-
integer | the starting segment number |
array | an array of default values |
- Returns
- array
Definition at line 336 of file URI.php.
◆ $enable_query_strings
$enable_query_strings =false |
◆ $keyval
◆ $permitted_uri_chars
$permitted_uri_chars ="a-z 0-9~%.:_\-" |
◆ $rsegments
◆ $segments
◆ $uri_protocol
| 'AUTO' Default - auto detects | 'PATH_INFO' Uses the PATH_INFO | 'QUERY_STRING' Uses the QUERY_STRING | 'REQUEST_URI' Uses the REQUEST_URI | 'ORIG_PATH_INFO' Uses the ORIG_PATH_INFO
Definition at line 49 of file URI.php.
◆ $uri_string
The documentation for this class was generated from the following file: