function StreamWrapperManager::getClass
Same name and namespace in other branches
- 11.x core/lib/Drupal/Core/StreamWrapper/StreamWrapperManager.php \Drupal\Core\StreamWrapper\StreamWrapperManager::getClass()
- 10 core/lib/Drupal/Core/StreamWrapper/StreamWrapperManager.php \Drupal\Core\StreamWrapper\StreamWrapperManager::getClass()
- 9 core/lib/Drupal/Core/StreamWrapper/StreamWrapperManager.php \Drupal\Core\StreamWrapper\StreamWrapperManager::getClass()
- 8.9.x core/lib/Drupal/Core/StreamWrapper/StreamWrapperManager.php \Drupal\Core\StreamWrapper\StreamWrapperManager::getClass()
Returns the stream wrapper class name for a given scheme.
Parameters
string $scheme: Stream scheme.
Return value
class-string<\Drupal\Core\StreamWrapper\StreamWrapperInterface>|false Return string if a scheme has a registered handler, or FALSE.
Overrides StreamWrapperManagerInterface::getClass
3 calls to StreamWrapperManager::getClass()
- StreamWrapperManager::isValidScheme in core/
lib/ Drupal/ Core/ StreamWrapper/ StreamWrapperManager.php - Checks that the scheme of a stream URI is valid.
- StreamWrapperManager::normalizeUri in core/
lib/ Drupal/ Core/ StreamWrapper/ StreamWrapperManager.php - Normalizes a URI by making it syntactically correct.
- StreamWrapperManager::register in core/
lib/ Drupal/ Core/ StreamWrapper/ StreamWrapperManager.php - Registers the tagged stream wrappers.
File
-
core/
lib/ Drupal/ Core/ StreamWrapper/ StreamWrapperManager.php, line 108
Class
- StreamWrapperManager
- Provides a StreamWrapper manager.
Namespace
Drupal\Core\StreamWrapperCode
public function getClass($scheme) {
if ($this->container
->has($scheme)) {
return get_class($this->container
->get($scheme));
}
return FALSE;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.