You are here

interface FlysystemPluginInterface in Flysystem 2.0.x

Same name and namespace in other branches
  1. 8 src/Plugin/FlysystemPluginInterface.php \Drupal\flysystem\Plugin\FlysystemPluginInterface
  2. 7 src/Plugin/FlysystemPluginInterface.php \Drupal\flysystem\Plugin\FlysystemPluginInterface
  3. 3.x src/Plugin/FlysystemPluginInterface.php \Drupal\flysystem\Plugin\FlysystemPluginInterface
  4. 3.0.x src/Plugin/FlysystemPluginInterface.php \Drupal\flysystem\Plugin\FlysystemPluginInterface

Hierarchy

Expanded class hierarchy of FlysystemPluginInterface

All classes that implement FlysystemPluginInterface

4 files declare their use of FlysystemPluginInterface
FlysystemFactoryTest.php in tests/src/Unit/FlysystemFactoryTest.php
Ftp.php in src/Flysystem/Ftp.php
Local.php in src/Flysystem/Local.php
Missing.php in src/Flysystem/Missing.php

File

src/Plugin/FlysystemPluginInterface.php, line 5

Namespace

Drupal\flysystem\Plugin
View source
interface FlysystemPluginInterface {

  /**
   * Returns the Flysystem adapter.
   *
   * Plugins should not keep references to the adapter. If a plugin needs to
   * perform filesystem operations, it should either use a scheme:// or have the
   * \Drupal\flysystem\FlysystemFactory injected.
   *
   * @return \League\Flysystem\AdapterInterface
   *   The Flysytem adapter.
   */
  public function getAdapter();

  /**
   * 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".
   *
   * @param string $uri
   *   The URI to provide a URL for.
   *
   * @return string
   *   Returns a string containing a web accessible URL for the resource.
   */
  public function getExternalUrl($uri);

  /**
   * Checks the sanity of the filesystem.
   *
   * If this is a local filesystem, .htaccess file should be in place.
   *
   * @return array
   *   A list of error messages.
   */
  public function ensure($force = FALSE);

}

Members

Namesort descending Modifiers Type Description Overrides
FlysystemPluginInterface::ensure public function Checks the sanity of the filesystem. 3
FlysystemPluginInterface::getAdapter public function Returns the Flysystem adapter. 3
FlysystemPluginInterface::getExternalUrl public function Returns a web accessible URL for the resource. 2