function StreamWrapperBase::setUri in System stream wrapper 8
Sets the absolute stream resource URI.
This allows you to set the URI. Generally is only called by the factory method.
Parameters
string $uri: A string containing the URI that should be used for this instance.
Overrides StreamWrapperInterface::setUri
File
- src/
StreamWrapper/ StreamWrapperBase.php, line 38
Class
- StreamWrapperBase
- Provides a base class for all stream wrappers.
Namespace
Drupal\system_stream_wrapper\StreamWrapperCode
function setUri($uri) {
if (strpos($uri, '://') === FALSE) {
// The delimiter ('://') was not found in $uri, malformed $uri passed.
throw new \InvalidArgumentException("Malformed uri parameter passed: {$this->uri}");
}
$this->uri = $uri;
}