W3cubDocs

/Drupal 8

public function FileSystemInterface::validScheme

public FileSystemInterface::validScheme($scheme)

Checks that the scheme of a stream URI is valid.

Confirms that there is a registered stream handler for the provided scheme and that it is callable. This is useful if you want to confirm a valid scheme without creating a new instance of the registered handler.

Parameters

string $scheme: A URI scheme, a stream is referenced as "scheme://target".

Return value

bool Returns TRUE if the string is the name of a validated stream, or FALSE if the scheme does not have a registered handler.

File

core/lib/Drupal/Core/File/FileSystemInterface.php, line 238

Class

FileSystemInterface
Provides an interface for helpers that operate on files and stream wrappers.

Namespace

Drupal\Core\File

Code

public function validScheme($scheme);

© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!lib!Drupal!Core!File!FileSystemInterface.php/function/FileSystemInterface::validScheme/8.1.x