public function Uri::__construct in Zircon Profile 8
Same name in this branch
- 8 vendor/zendframework/zend-diactoros/src/Uri.php \Zend\Diactoros\Uri::__construct()
- 8 vendor/zendframework/zend-feed/src/Uri.php \Zend\Feed\Uri::__construct()
- 8 vendor/guzzlehttp/psr7/src/Uri.php \GuzzleHttp\Psr7\Uri::__construct()
Same name and namespace in other branches
- 8.0 vendor/zendframework/zend-diactoros/src/Uri.php \Zend\Diactoros\Uri::__construct()
Parameters
string $uri:
Throws
InvalidArgumentException on non-string $uri argument
File
- vendor/
zendframework/ zend-diactoros/ src/ Uri.php, line 94
Class
- Uri
- Implementation of Psr\Http\UriInterface.
Namespace
Zend\DiactorosCode
public function __construct($uri = '') {
if (!is_string($uri)) {
throw new InvalidArgumentException(sprintf('URI passed to constructor must be a string; received "%s"', is_object($uri) ? get_class($uri) : gettype($uri)));
}
if (!empty($uri)) {
$this
->parseUri($uri);
}
}