diff --git a/core/includes/file.inc b/core/includes/file.inc index 6941048..494db7f 100644 --- a/core/includes/file.inc +++ b/core/includes/file.inc @@ -158,6 +158,8 @@ * @see hook_stream_wrappers() * @see hook_stream_wrappers_alter() * @see \Drupal\Core\StreamWrapper\StreamWrapperManager + * + * @deprecated Use \Drupal::service('plugin.manager.stream_wrapper')->getWrappers() */ function file_get_stream_wrappers($filter = STREAM_WRAPPERS_ALL) { return \Drupal::service('plugin.manager.stream_wrapper')->getWrappers($filter); @@ -286,6 +288,8 @@ function file_stream_wrapper_uri_normalize($uri) { * if no registered handler could be found. For example, a URI of * "private://example.txt" would return a new private stream wrapper object * (Drupal\Core\StreamWrapper\PrivateStream). + * + * @deprecated Use \Drupal::service('plugin.manager.stream_wrapper')->getInstance() */ function file_stream_wrapper_get_instance_by_uri($uri) { return \Drupal::service('plugin.manager.stream_wrapper')->getInstance(array('uri' => $uri)); @@ -310,6 +314,8 @@ function file_stream_wrapper_get_instance_by_uri($uri) { * For example, for the public scheme a stream wrapper object * (Drupal\Core\StreamWrapper\PublicStream). * FALSE is returned if no registered handler could be found. + * + * @deprecated Use \Drupal::service('plugin.manager.stream_wrapper')->getInstance() */ function file_stream_wrapper_get_instance_by_scheme($scheme) { return \Drupal::service('plugin.manager.stream_wrapper')->getInstance(array('scheme' => $scheme)); diff --git a/core/lib/Drupal/Core/StreamWrapper/PrivateStream.php b/core/lib/Drupal/Core/StreamWrapper/PrivateStream.php index 6933004..dbe09fc 100644 --- a/core/lib/Drupal/Core/StreamWrapper/PrivateStream.php +++ b/core/lib/Drupal/Core/StreamWrapper/PrivateStream.php @@ -7,8 +7,6 @@ namespace Drupal\Core\StreamWrapper; -use Drupal\Core\StreamWrapper\LocalStream; - /** * Drupal private (private://) stream wrapper class. * diff --git a/core/lib/Drupal/Core/StreamWrapper/PublicStream.php b/core/lib/Drupal/Core/StreamWrapper/PublicStream.php index 500d0ee..c9fb480 100644 --- a/core/lib/Drupal/Core/StreamWrapper/PublicStream.php +++ b/core/lib/Drupal/Core/StreamWrapper/PublicStream.php @@ -7,8 +7,6 @@ namespace Drupal\Core\StreamWrapper; -use Drupal\Core\StreamWrapper\LocalStream; - /** * Defines a Drupal public (public://) stream wrapper class. * diff --git a/core/lib/Drupal/Core/StreamWrapper/StreamWrapperManager.php b/core/lib/Drupal/Core/StreamWrapper/StreamWrapperManager.php index 0bb2edc..3f4ec19 100644 --- a/core/lib/Drupal/Core/StreamWrapper/StreamWrapperManager.php +++ b/core/lib/Drupal/Core/StreamWrapper/StreamWrapperManager.php @@ -46,7 +46,8 @@ public function __construct(\Traversable $namespaces, ModuleHandlerInterface $mo * Provides Drupal stream wrapper registry. * * A stream wrapper is an abstraction of a file system that allows Drupal to - * use the same set of methods to access both local files and remote resources. + * use the same set of methods to access both local files and remote + * resources. * * Provide a facility for managing and querying user-defined stream wrappers * in PHP. PHP's internal stream_get_wrappers() doesn't return the class @@ -59,15 +60,15 @@ public function __construct(\Traversable $namespaces, ModuleHandlerInterface $mo * A stream is referenced as "scheme://target". * * The optional $filter parameter can be used to retrieve only the stream - * wrappers that are appropriate for particular usage. For example, this returns - * only stream wrappers that use local file storage: + * wrappers that are appropriate for particular usage. For example, this + * returns only stream wrappers that use local file storage: * * @code * $local_stream_wrappers = file_get_stream_wrappers(STREAM_WRAPPERS_LOCAL); * @endcode * - * The $filter parameter can only filter to types containing a particular flag. - * In some cases, you may want to filter to types that do not contain a + * The $filter parameter can only filter to types containing a particular + * flag. In some cases, you may want to filter to types that do not contain a * particular flag. For example, you may want to retrieve all stream wrappers * that are not writable, or all stream wrappers that are not local. PHP's * array_diff_key() function can be used to help with this. For example, this @@ -80,16 +81,17 @@ public function __construct(\Traversable $namespaces, ModuleHandlerInterface $mo * (Optional) Filters out all types except those with an on bit for each on * bit in $filter. For example, if $filter is STREAM_WRAPPERS_WRITE_VISIBLE, * which is equal to (STREAM_WRAPPERS_READ | STREAM_WRAPPERS_WRITE | - * STREAM_WRAPPERS_VISIBLE), then only stream wrappers with all three of these - * bits set are returned. Defaults to STREAM_WRAPPERS_ALL, which returns all - * registered stream wrappers. + * STREAM_WRAPPERS_VISIBLE), then only stream wrappers with all three of + * these bits set are returned. Defaults to STREAM_WRAPPERS_ALL, which + * returns all registered stream wrappers. * * @return array * An array keyed by scheme, with values containing an array of information - * about the stream wrapper, as returned by hook_stream_wrappers(). If $filter - * is omitted or set to STREAM_WRAPPERS_ALL, the entire Drupal stream wrapper - * registry is returned. Otherwise only the stream wrappers whose 'type' - * bitmask has an on bit for each bit specified in $filter are returned. + * about the stream wrapper, as returned by hook_stream_wrappers(). If + * $filter is omitted or set to STREAM_WRAPPERS_ALL, the entire Drupal + * stream wrapper registry is returned. Otherwise only the stream wrappers + * whose 'type' bitmask has an on bit for each bit specified in $filter are + * returned. */ public function getWrappers($filter = STREAM_WRAPPERS_ALL) { if (!$this->wrappers) { diff --git a/core/lib/Drupal/Core/StreamWrapper/TemporaryStream.php b/core/lib/Drupal/Core/StreamWrapper/TemporaryStream.php index 1a3dfc7..4aacb5e 100644 --- a/core/lib/Drupal/Core/StreamWrapper/TemporaryStream.php +++ b/core/lib/Drupal/Core/StreamWrapper/TemporaryStream.php @@ -7,8 +7,6 @@ namespace Drupal\Core\StreamWrapper; -use Drupal\Core\StreamWrapper\LocalStream; - /** * Defines a Drupal temporary (temporary://) stream wrapper class. *