Definition at line 30 of file Uri.php.
◆ __construct()
__construct |
( |
|
$scheme, |
|
|
|
$schemeSpecific = '' |
|
) |
| |
|
abstractprotected |
Zend_Uri and its subclasses cannot be instantiated directly. Use Zend_Uri::factory() to return a new Zend_Uri object.
- Parameters
-
string | $scheme | The scheme of the URI |
string | $schemeSpecific | The scheme-specific part of the URI |
◆ __toString()
Return a string representation of this URI.
- See also
- getUri()
- Returns
- string
Definition at line 54 of file Uri.php.
58 }
catch (Exception $e) {
59 trigger_error($e->getMessage(), E_USER_WARNING);
◆ check()
Convenience function, checks that a $uri string is well-formed by validating it but not returning an object. Returns TRUE if $uri is a well-formed URI, or FALSE otherwise.
- Parameters
-
string | $uri | The URI to check |
- Returns
- boolean
Definition at line 72 of file Uri.php.
76 }
catch (Exception $e) {
static factory($uri='http', $className=null)
◆ factory()
static factory |
( |
|
$uri = 'http' , |
|
|
|
$className = null |
|
) |
| |
|
static |
Create a new Zend_Uri object for a URI. If building a new URI, then $uri should contain only the scheme (http, ftp, etc). Otherwise, supply $uri with the complete URI.
- Parameters
-
string | $uri | The URI form which a Zend_Uri instance is created |
string | $className | The name of the class to use in order to manipulate URI |
- Exceptions
-
- Returns
- Zend_Uri http://www.faqs.org/rfcs/rfc2396.html
Create a new Zend_Uri object for the $uri. If a subclass of Zend_Uri exists for the scheme, return an instance of that class. Otherwise, a Zend_Uri_Exception is thrown.
Definition at line 96 of file Uri.php.
99 $uri = explode(
':', $uri, 2);
100 $scheme = strtolower($uri[0]);
101 $schemeSpecific = isset($uri[1]) ===
true ? $uri[1] :
'';
103 if (strlen($scheme) === 0) {
104 #require_once 'Zend/Uri/Exception.php'; 109 if (ctype_alnum($scheme) ===
false) {
110 #require_once 'Zend/Uri/Exception.php'; 111 throw new Zend_Uri_Exception(
'Illegal scheme supplied, only alphanumeric characters are permitted');
129 #require_once 'Zend/Uri/Exception.php'; 135 #require_once 'Zend/Loader.php'; 138 }
catch (Exception $e) {
139 #require_once 'Zend/Uri/Exception.php'; 143 $schemeHandler =
new $className($scheme, $schemeSpecific);
145 if (! $schemeHandler instanceof
Zend_Uri) {
146 #require_once 'Zend/Uri/Exception.php'; 150 return $schemeHandler;
static loadClass($class, $dirs=null)
◆ getScheme()
Get the URI's scheme
- Returns
- string|false Scheme or false if no scheme is set.
Definition at line 158 of file Uri.php.
160 if (empty($this->_scheme) ===
false) {
◆ getUri()
Return a string representation of this URI.
- Returns
- string
◆ setConfig()
static setConfig |
( |
|
$config | ) |
|
|
static |
Set global configuration options
- Parameters
-
Definition at line 172 of file Uri.php.
177 throw new Zend_Uri_Exception(
"Config must be an array or an instance of Zend_Config.");
180 foreach (
$config as $k => $v) {
181 self::$_config[$k] = $v;
elseif(isset( $params[ 'redirect_parent']))
◆ valid()
Returns TRUE if this URI is valid, or FALSE otherwise.
- Returns
- boolean
◆ $_config
Initial value:= array(
'allow_unwise' => false
)
Definition at line 44 of file Uri.php.
◆ $_scheme
The documentation for this class was generated from the following file:
- vendor/magento/zendframework1/library/Zend/Uri.php