3 namespace Drupal\libraries\StreamWrapper;
6 * Provides a trait for local streams that are not publicly accessible.
8 * @see \Drupal\locale\StreamWrapper\TranslationsStream
10 trait PrivateStreamTrait {
13 * Returns a web accessible URL for the resource.
15 * This function should return a URL that can be embedded in a web page
16 * and accessed from a browser. For example, the external URL of
17 * "youtube://xIpLd0WQKCY" might be
18 * "http://www.youtube.com/watch?v=xIpLd0WQKCY".
21 * Returns a string containing a web accessible URL for the resource.
23 * @see \Drupal\Core\StreamWrapper\StreamWrapperInterface::getExternalUrl()
25 function getExternalUrl() {
26 throw new \LogicException("{$this->getName()} should not be public.");
30 * Returns the name of the stream wrapper for use in the UI.
33 * The stream wrapper name.
35 * @see \Drupal\Core\StreamWrapper\StreamWrapperInterface::getName()
37 abstract public function getName();