function file_uri_target
Same name in other branches
- 7.x includes/file.inc \file_uri_target()
Returns the part of a URI after the schema.
Parameters
string $uri: A stream, referenced as "scheme://target" or "data:target".
Return value
string|bool A string containing the target (path), or FALSE if none. For example, the URI "public://sample/test.txt" would return "sample/test.txt".
Deprecated
in drupal:8.8.0 and is removed from drupal:9.0.0. Use \Drupal\Core\StreamWrapper\StreamWrapperManagerInterface::getTarget() instead.
See also
https://www.drupal.org/node/3035273
Related topics
1 call to file_uri_target()
- FileSystemDeprecationTest::testDeprecatedFileUriTarget in core/
tests/ Drupal/ KernelTests/ Core/ File/ FileSystemDeprecationTest.php - @expectedDeprecation file_uri_target() is deprecated in drupal:8.8.0 and will be removed before drupal:9.0.0. Use \Drupal\Core\StreamWrapper\StreamWrapperManagerInterface::getTarget() instead. See https://www.drupal.org/node/3035273
File
-
core/
includes/ file.inc, line 141
Code
function file_uri_target($uri) {
@trigger_error('file_uri_target() is deprecated in drupal:8.8.0 and will be removed before drupal:9.0.0. Use \\Drupal\\Core\\StreamWrapper\\StreamWrapperManagerInterface::getTarget() instead. See https://www.drupal.org/node/3035273', E_USER_DEPRECATED);
return StreamWrapperManager::getTarget($uri);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.