function file_stream_wrapper_valid_scheme

Same name in other branches
  1. 7.x includes/file.inc \file_stream_wrapper_valid_scheme()

Checks that the scheme of a stream URI is valid.

Deprecated

in drupal:8.8.0 and is removed from drupal:9.0.0. Use Drupal\Core\StreamWrapper\StreamWrapperManagerInterface::isValidScheme() instead.

See also

https://www.drupal.org/node/3035273

Related topics

1 call to file_stream_wrapper_valid_scheme()
FileSystemDeprecationTest::testDeprecatedValidScheme in core/tests/Drupal/KernelTests/Core/File/FileSystemDeprecationTest.php
@expectedDeprecation file_stream_wrapper_valid_scheme() is deprecated in drupal:8.0.0 and will be removed before drupal:9.0.0. Use \Drupal\Core\StreamWrapper\StreamWrapperManagerInterface::isValidScheme() instead. See https://www.drupal.org/node/3035273

File

core/includes/file.inc, line 119

Code

function file_stream_wrapper_valid_scheme($scheme) {
    @trigger_error('file_stream_wrapper_valid_scheme() is deprecated in drupal:8.0.0 and will be removed before drupal:9.0.0. Use \\Drupal\\Core\\StreamWrapper\\StreamWrapperManagerInterface::isValidScheme() instead. See https://www.drupal.org/node/3035273', E_USER_DEPRECATED);
    return \Drupal::service('stream_wrapper_manager')->isValidScheme($scheme);
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.