interface StreamWrapperInterface in Zircon Profile 8.0
Same name and namespace in other branches
- 8 core/lib/Drupal/Core/StreamWrapper/StreamWrapperInterface.php \Drupal\Core\StreamWrapper\StreamWrapperInterface
Defines a Drupal stream wrapper extension.
Extends the StreamWrapperInterface with methods expected by Drupal stream wrapper classes.
Hierarchy
- interface \Drupal\Core\StreamWrapper\PhpStreamWrapperInterface
- interface \Drupal\Core\StreamWrapper\StreamWrapperInterface
Expanded class hierarchy of StreamWrapperInterface
All classes that implement StreamWrapperInterface
9 files declare their use of StreamWrapperInterface
- BrowserTestBase.php in core/
modules/ simpletest/ src/ BrowserTestBase.php - Contains \Drupal\simpletest\BrowserTestBase.
- editor.admin.inc in core/
modules/ editor/ editor.admin.inc - Administration functions for editor.module.
- FileItem.php in core/
modules/ file/ src/ Plugin/ Field/ FieldType/ FileItem.php - Contains \Drupal\file\Plugin\Field\FieldType\FileItem.
- FileSystemForm.php in core/
modules/ system/ src/ Form/ FileSystemForm.php - Contains \Drupal\system\Form\FileSystemForm.
- GDToolkit.php in core/
modules/ system/ src/ Plugin/ ImageToolkit/ GDToolkit.php - Contains \Drupal\system\Plugin\ImageToolkit\GDToolkit.
File
- core/
lib/ Drupal/ Core/ StreamWrapper/ StreamWrapperInterface.php, line 30 - Contains \Drupal\Core\StreamWrapper\StreamWrapperInterface.
Namespace
Drupal\Core\StreamWrapperView source
interface StreamWrapperInterface extends PhpStreamWrapperInterface {
/**
* Stream wrapper bit flags that are the basis for composite types.
*
* Note that 0x0002 is skipped, because it was the value of a constant that
* has since been removed.
*/
/**
* A filter that matches all wrappers.
*/
const ALL = 0x0;
/**
* Refers to a local file system location.
*/
const LOCAL = 0x1;
/**
* Wrapper is readable (almost always true).
*/
const READ = 0x4;
/**
* Wrapper is writeable.
*/
const WRITE = 0x8;
/**
* Exposed in the UI and potentially web accessible.
*/
const VISIBLE = 0x10;
/**
* Composite stream wrapper bit flags that are usually used as the types.
*/
/**
* Not visible in the UI or accessible via web, but readable and writable.
* E.g. the temporary directory for uploads.
*/
const HIDDEN = 0xc;
/**
* Hidden, readable and writeable using local files.
*/
const LOCAL_HIDDEN = 0xd;
/**
* Visible, readable and writeable.
*/
const WRITE_VISIBLE = 0x1c;
/**
* Visible and read-only.
*/
const READ_VISIBLE = 0x14;
/**
* This is the default 'type' falg. This does not include
* StreamWrapperInterface::LOCAL, because PHP grants a greater trust level to
* local files (for example, they can be used in an "include" statement,
* regardless of the "allow_url_include" setting), so stream wrappers need to
* explicitly opt-in to this.
*/
const NORMAL = 0x1c;
/**
* Visible, readable and writeable using local files.
*/
const LOCAL_NORMAL = 0x1d;
/**
* Returns the type of stream wrapper.
*
* @return int
*/
public static function getType();
/**
* Returns the name of the stream wrapper for use in the UI.
*
* @return string
* The stream wrapper name.
*/
public function getName();
/**
* Returns the description of the stream wrapper for use in the UI.
*
* @return string
* The stream wrapper description.
*/
public function getDescription();
/**
* Sets the absolute stream resource URI.
*
* This allows you to set the URI. Generally is only called by the factory
* method.
*
* @param string $uri
* A string containing the URI that should be used for this instance.
*/
public function setUri($uri);
/**
* Returns the stream resource URI.
*
* @return string
* Returns the current URI of the instance.
*/
public function getUri();
/**
* 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 string
* Returns a string containing a web accessible URL for the resource.
*/
public function getExternalUrl();
/**
* Returns canonical, absolute path of the resource.
*
* Implementation placeholder. PHP's realpath() does not support stream
* wrappers. We provide this as a default so that individual wrappers may
* implement their own solutions.
*
* @return string
* Returns a string with absolute pathname on success (implemented
* by core wrappers), or FALSE on failure or if the registered
* wrapper does not provide an implementation.
*/
public function realpath();
/**
* Gets the name of the directory from a given path.
*
* This method is usually accessed through drupal_dirname(), which wraps
* around the normal PHP dirname() function, which does not support stream
* wrappers.
*
* @param string $uri
* An optional URI.
*
* @return string
* A string containing the directory name, or FALSE if not applicable.
*
* @see drupal_dirname()
*/
public function dirname($uri = NULL);
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
PhpStreamWrapperInterface:: |
public | function | 1 | |
PhpStreamWrapperInterface:: |
public | function | 1 | |
PhpStreamWrapperInterface:: |
public | function | 1 | |
PhpStreamWrapperInterface:: |
public | function | 1 | |
PhpStreamWrapperInterface:: |
public | function | 2 | |
PhpStreamWrapperInterface:: |
public | function | 2 | |
PhpStreamWrapperInterface:: |
public | function | 2 | |
PhpStreamWrapperInterface:: |
public | function | Retrieve the underlying stream resource. | 1 |
PhpStreamWrapperInterface:: |
public | function | 1 | |
PhpStreamWrapperInterface:: |
public | function | 1 | |
PhpStreamWrapperInterface:: |
public | function | 2 | |
PhpStreamWrapperInterface:: |
public | function | 2 | |
PhpStreamWrapperInterface:: |
public | function | Sets metadata on the stream. | 2 |
PhpStreamWrapperInterface:: |
public | function | 2 | |
PhpStreamWrapperInterface:: |
public | function | 1 | |
PhpStreamWrapperInterface:: |
public | function | Seeks to specific location in a stream. | 1 |
PhpStreamWrapperInterface:: |
public | function | Change stream options. | 1 |
PhpStreamWrapperInterface:: |
public | function | 1 | |
PhpStreamWrapperInterface:: |
public | function | 1 | |
PhpStreamWrapperInterface:: |
public | function | Truncate stream. | 2 |
PhpStreamWrapperInterface:: |
public | function | 2 | |
PhpStreamWrapperInterface:: |
public | function | 2 | |
PhpStreamWrapperInterface:: |
public | function | 1 | |
StreamWrapperInterface:: |
constant | A filter that matches all wrappers. | ||
StreamWrapperInterface:: |
public | function | Gets the name of the directory from a given path. | 1 |
StreamWrapperInterface:: |
public | function | Returns the description of the stream wrapper for use in the UI. | 6 |
StreamWrapperInterface:: |
public | function | Returns a web accessible URL for the resource. | 6 |
StreamWrapperInterface:: |
public | function | Returns the name of the stream wrapper for use in the UI. | 6 |
StreamWrapperInterface:: |
public static | function | Returns the type of stream wrapper. | 1 |
StreamWrapperInterface:: |
public | function | Returns the stream resource URI. | 2 |
StreamWrapperInterface:: |
constant | Not visible in the UI or accessible via web, but readable and writable. E.g. the temporary directory for uploads. | ||
StreamWrapperInterface:: |
constant | Refers to a local file system location. | ||
StreamWrapperInterface:: |
constant | Hidden, readable and writeable using local files. | ||
StreamWrapperInterface:: |
constant | Visible, readable and writeable using local files. | ||
StreamWrapperInterface:: |
constant | This is the default 'type' falg. This does not include StreamWrapperInterface::LOCAL, because PHP grants a greater trust level to local files (for example, they can be used in an "include" statement, regardless of the… | ||
StreamWrapperInterface:: |
constant | Wrapper is readable (almost always true). | ||
StreamWrapperInterface:: |
constant | Visible and read-only. | ||
StreamWrapperInterface:: |
public | function | Returns canonical, absolute path of the resource. | 1 |
StreamWrapperInterface:: |
public | function | Sets the absolute stream resource URI. | 2 |
StreamWrapperInterface:: |
constant | Exposed in the UI and potentially web accessible. | ||
StreamWrapperInterface:: |
constant | Wrapper is writeable. | ||
StreamWrapperInterface:: |
constant | Visible, readable and writeable. |