You are here

public function FlysystemBridge::getExternalUrl in Flysystem 8

Same name and namespace in other branches
  1. 7 src/FlysystemBridge.php \Drupal\flysystem\FlysystemBridge::getExternalUrl()
  2. 3.x src/FlysystemBridge.php \Drupal\flysystem\FlysystemBridge::getExternalUrl()
  3. 2.0.x src/FlysystemBridge.php \Drupal\flysystem\FlysystemBridge::getExternalUrl()
  4. 3.0.x src/FlysystemBridge.php \Drupal\flysystem\FlysystemBridge::getExternalUrl()

Returns a web accessible URL for the resource.

This function should return a URL that can be embedded in a web page and accessed from a browser. For example, the external URL of "youtube://xIpLd0WQKCY" might be "http://www.youtube.com/watch?v=xIpLd0WQKCY".

Return value

string Returns a string containing a web accessible URL for the resource.

Overrides StreamWrapperInterface::getExternalUrl

File

src/FlysystemBridge.php, line 63

Class

FlysystemBridge
An adapter for Flysystem to StreamWrapperInterface.

Namespace

Drupal\flysystem

Code

public function getExternalUrl() {
  return $this
    ->getFactory()
    ->getPlugin($this
    ->getProtocol())
    ->getExternalUrl($this->uri);
}