Backdrop stream wrapper interface.

Provides a Backdrop interface and classes to implement PHP stream wrappers for public, private, and temporary files.

A stream wrapper is an abstraction of a file system that allows Backdrop to use the same set of methods to access both local files and remote resources.

Note that PHP 5.2 fopen() only supports URIs of the form "scheme://target" despite the fact that according to RFC 3986 a URI's scheme component delimiter is in general just ":", not "://". Because of this PHP limitation and for consistency Backdrop will only accept URIs of form "scheme://target".

See also

http://www.faqs.org/rfcs/rfc3986.html

http://bugs.php.net/bug.php?id=47070

File

core/includes/stream_wrappers.inc

Constants

Namesort descending Description
STREAM_WRAPPERS_ALL Stream wrapper bit flag -- a filter that matches all wrappers.
STREAM_WRAPPERS_HIDDEN Stream wrapper type flag -- not visible in the UI or accessible via web, but readable and writable. E.g. the temporary directory for uploads.
STREAM_WRAPPERS_LOCAL Stream wrapper bit flag -- refers to a local file system location.
STREAM_WRAPPERS_LOCAL_HIDDEN Stream wrapper type flag -- hidden, readable and writeable using local files.
STREAM_WRAPPERS_LOCAL_NORMAL Stream wrapper type flag -- visible, readable and writeable using local files.
STREAM_WRAPPERS_NORMAL Stream wrapper type flag -- the default when 'type' is omitted from hook_stream_wrappers(). This does not include STREAM_WRAPPERS_LOCAL, because PHP grants a greater trust level to local files (for example, they can be used in an…
STREAM_WRAPPERS_READ Stream wrapper bit flag -- wrapper is readable (almost always true).
STREAM_WRAPPERS_READ_VISIBLE Stream wrapper type flag -- visible and read-only.
STREAM_WRAPPERS_VISIBLE Stream wrapper bit flag -- exposed in the UI and potentially web accessible.
STREAM_WRAPPERS_WRITE Stream wrapper bit flag -- wrapper is writeable.
STREAM_WRAPPERS_WRITE_VISIBLE Stream wrapper type flag -- visible, readable and writeable.

Classes

Namesort descending Description
BackdropLocalStreamWrapper Backdrop stream wrapper base class for local files.
BackdropPrivateStreamWrapper Backdrop private (private://) stream wrapper class.
BackdropPublicStreamWrapper Backdrop public (public://) stream wrapper class.
BackdropTemporaryStreamWrapper Backdrop temporary (temporary://) stream wrapper class.

Interfaces

Namesort descending Description
BackdropStreamWrapperInterface Backdrop stream wrapper extension.
StreamWrapperInterface Generic PHP stream wrapper interface.