function StreamWrapperManager::addStreamWrapper

Same name and namespace in other branches
  1. 9 core/lib/Drupal/Core/StreamWrapper/StreamWrapperManager.php \Drupal\Core\StreamWrapper\StreamWrapperManager::addStreamWrapper()
  2. 8.9.x core/lib/Drupal/Core/StreamWrapper/StreamWrapperManager.php \Drupal\Core\StreamWrapper\StreamWrapperManager::addStreamWrapper()
  3. 11.x core/lib/Drupal/Core/StreamWrapper/StreamWrapperManager.php \Drupal\Core\StreamWrapper\StreamWrapperManager::addStreamWrapper()

Adds a stream wrapper.

Internal use only.

Parameters

string $service_id: The service id.

string $class: The stream wrapper class.

string $scheme: The scheme for which the wrapper should be registered.

File

core/lib/Drupal/Core/StreamWrapper/StreamWrapperManager.php, line 159

Class

StreamWrapperManager
Provides a StreamWrapper manager.

Namespace

Drupal\Core\StreamWrapper

Code

public function addStreamWrapper($service_id, $class, $scheme) {
    $this->info[$scheme] = [
        'class' => $class,
        'type' => $class::getType(),
        'service_id' => $service_id,
    ];
}

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