You are here

protected function FlysystemUrlTrait::getScheme in Flysystem 8

Same name and namespace in other branches
  1. 3.x src/Plugin/FlysystemUrlTrait.php \Drupal\flysystem\Plugin\FlysystemUrlTrait::getScheme()
  2. 2.0.x src/Plugin/FlysystemUrlTrait.php \Drupal\flysystem\Plugin\FlysystemUrlTrait::getScheme()
  3. 3.0.x src/Plugin/FlysystemUrlTrait.php \Drupal\flysystem\Plugin\FlysystemUrlTrait::getScheme()

Returns the scheme from the internal URI.

Parameters

string $uri: The URI.

Return value

string The scheme.

1 call to FlysystemUrlTrait::getScheme()
FlysystemUrlTrait::getExternalUrl in src/Plugin/FlysystemUrlTrait.php
Returns a web accessible URL for the resource.

File

src/Plugin/FlysystemUrlTrait.php, line 60

Class

FlysystemUrlTrait
Helper trait for generating URLs from adapter plugins.

Namespace

Drupal\flysystem\Plugin

Code

protected function getScheme($uri) {
  return substr($uri, 0, strpos($uri, '://'));
}