You are here

protected function FlysystemUrlTrait::getTarget in Flysystem 8

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

Returns the target file path of a URI.

Parameters

string $uri: The URI.

Return value

string The file path of the URI.

2 calls to FlysystemUrlTrait::getTarget()
FlysystemUrlTrait::getExternalUrl in src/Plugin/FlysystemUrlTrait.php
Returns a web accessible URL for the resource.
Local::getExternalUrl in src/Flysystem/Local.php
Returns a web accessible URL for the resource.

File

src/Plugin/FlysystemUrlTrait.php, line 47

Class

FlysystemUrlTrait
Helper trait for generating URLs from adapter plugins.

Namespace

Drupal\flysystem\Plugin

Code

protected function getTarget($uri) {
  return Util::normalizePath(substr($uri, strpos($uri, '://') + 3));
}