![]() |
TeamSpeak 3 PHP Framework
1.1.16
Copyright © Planet TeamSpeak. All rights reserved.
|
Helper class for URI handling. More...
Public Member Functions | |
__construct ($uri) | |
The TeamSpeak3_Helper_Uri constructor. | |
isValid () | |
Validate the current URI from the instance variables. | |
hasScheme () | |
Returns TRUE if the URI has a scheme. | |
getScheme ($default=null) | |
Returns the scheme. | |
checkUser ($username=null) | |
Returns TRUE if the username is valid. | |
hasUser () | |
Returns TRUE if the URI has a username. | |
getUser ($default=null) | |
Returns the username. | |
checkPass ($password=null) | |
Returns TRUE if the password is valid. | |
hasPass () | |
Returns TRUE if the URI has a password. | |
getPass ($default=null) | |
Returns the password. | |
checkHost ($host=null) | |
Returns TRUE if the host is valid. | |
hasHost () | |
Returns TRUE if the URI has a host. | |
getHost ($default=null) | |
Returns the host. | |
checkPort ($port=null) | |
Returns TRUE if the port is valid. | |
hasPort () | |
Returns TRUE if the URI has a port. | |
getPort ($default=null) | |
Returns the port. | |
checkPath ($path=null) | |
Returns TRUE if the path is valid. | |
hasPath () | |
Returns TRUE if the URI has a path. | |
getPath ($default=null) | |
Returns the path. | |
checkQuery ($query=null) | |
Returns TRUE if the query string is valid. | |
hasQuery () | |
Returns TRUE if the URI has a query string. | |
getQuery ($default=array()) | |
Returns an array containing the query string elements. | |
hasQueryVar ($key) | |
Returns TRUE if the URI has a query variable. | |
getQueryVar ($key, $default=null) | |
Returns a single variable from the query string. | |
checkFragment ($fragment=null) | |
Returns TRUE if the fragment string is valid. | |
hasFragment () | |
Returns TRUE if the URI has a fragment string. | |
getFragment ($default=null) | |
Returns the fragment. | |
Static Public Member Functions | |
static | check ($uri) |
Returns TRUE if a given URI is valid. | |
static | getUserParam ($key, $default=null) |
Returns a specified instance parameter from the $_REQUEST array. | |
static | getHostParam ($key, $default=null) |
Returns a specified environment parameter from the $_SERVER array. | |
static | getSessParam ($key, $default=null) |
Returns a specified session parameter from the $_SESSION array. | |
static | getFQDNParts ($hostname) |
Returns an array containing the three main parts of a FQDN (Fully Qualified Domain Name), including the top-level domain, the second-level domains or hostname and the third-level domain. | |
static | getHostUri () |
Returns the applications host address. | |
static | getBaseUri () |
Returns the applications base address. | |
Protected Member Functions | |
parseUri ($uriString= '') | |
Parses the scheme-specific portion of the URI and place its parts into instance variables. | |
Static Protected Member Functions | |
static | stripslashesRecursive ($var) |
Strips slashes from each element of an array using stripslashes(). | |
Protected Attributes | |
$scheme = null | |
$user = null | |
$pass = null | |
$host = null | |
$port = null | |
$path = null | |
$query = null | |
$fragment = null | |
$regex = array() | |
TeamSpeak3_Helper_Uri::__construct | ( | $uri | ) |
The TeamSpeak3_Helper_Uri constructor.
string | $uri |
TeamSpeak3_Helper_Exception |
Definition at line 104 of file Uri.php.
References isValid(), and parseUri().
|
protected |
Parses the scheme-specific portion of the URI and place its parts into instance variables.
TeamSpeak3_Helper_Exception |
Definition at line 143 of file Uri.php.
Referenced by __construct().
TeamSpeak3_Helper_Uri::isValid | ( | ) |
Validate the current URI from the instance variables.
Definition at line 178 of file Uri.php.
References checkFragment(), checkHost(), checkPass(), checkPath(), checkPort(), checkQuery(), and checkUser().
Referenced by __construct().
|
static |
TeamSpeak3_Helper_Uri::hasScheme | ( | ) |
Returns TRUE if the URI has a scheme.
Definition at line 208 of file Uri.php.
Referenced by getScheme().
TeamSpeak3_Helper_Uri::getScheme | ( | $default = null | ) |
Returns the scheme.
mixed | default |
Definition at line 219 of file Uri.php.
References hasScheme().
TeamSpeak3_Helper_Uri::checkUser | ( | $username = null | ) |
Returns TRUE if the username is valid.
string | $username |
TeamSpeak3_Helper_Exception |
Definition at line 231 of file Uri.php.
Referenced by isValid().
TeamSpeak3_Helper_Uri::hasUser | ( | ) |
TeamSpeak3_Helper_Uri::getUser | ( | $default = null | ) |
Returns the username.
mixed | default |
Definition at line 270 of file Uri.php.
References hasUser().
TeamSpeak3_Helper_Uri::checkPass | ( | $password = null | ) |
Returns TRUE if the password is valid.
string | $password |
TeamSpeak3_Helper_Exception |
Definition at line 282 of file Uri.php.
Referenced by isValid().
TeamSpeak3_Helper_Uri::hasPass | ( | ) |
TeamSpeak3_Helper_Uri::getPass | ( | $default = null | ) |
Returns the password.
mixed | default |
Definition at line 320 of file Uri.php.
References hasPass().
TeamSpeak3_Helper_Uri::checkHost | ( | $host = null | ) |
TeamSpeak3_Helper_Uri::hasHost | ( | ) |
TeamSpeak3_Helper_Uri::getHost | ( | $default = null | ) |
Returns the host.
mixed | default |
Definition at line 357 of file Uri.php.
References hasHost().
TeamSpeak3_Helper_Uri::checkPort | ( | $port = null | ) |
TeamSpeak3_Helper_Uri::hasPort | ( | ) |
TeamSpeak3_Helper_Uri::getPort | ( | $default = null | ) |
TeamSpeak3_Helper_Uri::checkPath | ( | $path = null | ) |
Returns TRUE if the path is valid.
string | $path |
TeamSpeak3_Helper_Exception |
Definition at line 406 of file Uri.php.
Referenced by isValid().
TeamSpeak3_Helper_Uri::hasPath | ( | ) |
TeamSpeak3_Helper_Uri::getPath | ( | $default = null | ) |
Returns the path.
mixed | default |
Definition at line 445 of file Uri.php.
References hasPath().
TeamSpeak3_Helper_Uri::checkQuery | ( | $query = null | ) |
Returns TRUE if the query string is valid.
string | $query |
TeamSpeak3_Helper_Exception |
Definition at line 457 of file Uri.php.
Referenced by isValid().
TeamSpeak3_Helper_Uri::hasQuery | ( | ) |
Returns TRUE if the URI has a query string.
Definition at line 485 of file Uri.php.
Referenced by getQuery(), getQueryVar(), and hasQueryVar().
TeamSpeak3_Helper_Uri::getQuery | ( | $default = array() | ) |
Returns an array containing the query string elements.
mixed | $default |
Definition at line 496 of file Uri.php.
References hasQuery().
TeamSpeak3_Helper_Uri::hasQueryVar | ( | $key | ) |
Returns TRUE if the URI has a query variable.
Definition at line 513 of file Uri.php.
References hasQuery().
TeamSpeak3_Helper_Uri::getQueryVar | ( | $key, | |
$default = null |
|||
) |
Returns a single variable from the query string.
string | $key | |
mixed | $default |
Definition at line 529 of file Uri.php.
References hasQuery().
TeamSpeak3_Helper_Uri::checkFragment | ( | $fragment = null | ) |
Returns TRUE if the fragment string is valid.
string | $fragment |
TeamSpeak3_Helper_Exception |
Definition at line 563 of file Uri.php.
Referenced by isValid().
TeamSpeak3_Helper_Uri::hasFragment | ( | ) |
Returns TRUE if the URI has a fragment string.
Definition at line 591 of file Uri.php.
Referenced by getFragment().
TeamSpeak3_Helper_Uri::getFragment | ( | $default = null | ) |
Returns the fragment.
mixed | default |
Definition at line 602 of file Uri.php.
References hasFragment().
|
static |
|
static |
|
static |
|
static |
Returns an array containing the three main parts of a FQDN (Fully Qualified Domain Name), including the top-level domain, the second-level domains or hostname and the third-level domain.
string | $hostname |
Definition at line 650 of file Uri.php.
Referenced by TeamSpeak3_Node_Host\serverGetByTSDNS().
|
static |
Returns the applications host address.
Definition at line 669 of file Uri.php.
|
static |
|
staticprotected |
Strips slashes from each element of an array using stripslashes().
mixed | $var |
Definition at line 703 of file Uri.php.