Update to Drupal 8.0.0 beta 14. For more information, see https://drupal.org/node/2544542

This commit is contained in:
Pantheon Automation 2015-08-27 12:03:05 -07:00 committed by Greg Anderson
parent 3b2511d96d
commit 81ccda77eb
2155 changed files with 54307 additions and 46870 deletions

View file

@ -12,7 +12,6 @@ use Symfony\Component\DependencyInjection\ContainerAware;
/**
* Provides a StreamWrapper manager.
*
* @see file_get_stream_wrappers()
* @see \Drupal\Core\StreamWrapper\StreamWrapperInterface
*/
class StreamWrapperManager extends ContainerAware implements StreamWrapperManagerInterface {

View file

@ -10,7 +10,6 @@ namespace Drupal\Core\StreamWrapper;
/**
* Provides a StreamWrapper manager.
*
* @see file_get_stream_wrappers()
* @see \Drupal\Core\StreamWrapper\StreamWrapperInterface
*/
interface StreamWrapperManagerInterface {
@ -39,8 +38,8 @@ interface StreamWrapperManagerInterface {
* returns only stream wrappers that use local file storage:
*
* @code
* $local_stream_wrappers =
* file_get_stream_wrappers(StreamWrapperInterface::LOCAL);
* $stream_wrapper_manager = \Drupal::service('stream_wrapper_manager');
* $local_stream_wrappers = $stream_wrapper_manager->getWrappers(StreamWrapperInterface::LOCAL);
* @endcode
*
* The $filter parameter can only filter to types containing a particular
@ -50,9 +49,11 @@ interface StreamWrapperManagerInterface {
* array_diff_key() function can be used to help with this. For example, this
* returns only stream wrappers that do not use local file storage:
* @code
* $remote_stream_wrappers =
* array_diff_key(file_get_stream_wrappers(StreamWrapperInterface::ALL),
* file_get_stream_wrappers(StreamWrapperInterface::LOCAL));
* $stream_wrapper_manager = \Drupal::service('stream_wrapper_manager');
* $remote_stream_wrappers = array_diff_key(
* $stream_wrapper_manager->getWrappers(StreamWrapperInterface::ALL),
* $stream_wrapper_manager->getWrappers(StreamWrapperInterface::LOCAL)
* );
* @endcode
*
* @param int $filter
@ -112,35 +113,52 @@ interface StreamWrapperManagerInterface {
public function getDescriptions($filter = StreamWrapperInterface::ALL);
/**
* Returns a stream wrapper via scheme.
* Returns a reference to the stream wrapper class responsible for a scheme.
*
* This helper method returns a stream instance using a scheme. That is, the
* passed string does not contain a "://". For example, "public" is a scheme
* but "public://" is a URI (stream). This is because the later contains both
* a scheme and target despite target being empty.
*
* Note: the instance URI will be initialized to "scheme://" so that you can
* make the customary method calls as if you had retrieved an instance by URI.
*
* @param string $scheme
* The scheme of the stream wrapper.
* If the stream was "public://target", "public" would be the scheme.
*
* @return \Drupal\Core\StreamWrapper\StreamWrapperInterface|bool
* A stream wrapper object, or false if the scheme is not available.
* Returns a new stream wrapper object appropriate for the given $scheme.
* For example, for the public scheme a stream wrapper object
* (Drupal\Core\StreamWrapper\PublicStream).
* FALSE is returned if no registered handler could be found.
*/
public function getViaScheme($scheme);
/**
* Returns a stream wrapper via URI.
* Returns a reference to the stream wrapper class responsible for a URI.
*
* The scheme determines the stream wrapper class that should be
* used by consulting the stream wrapper registry.
*
* @param string $uri
* The URI of the stream wrapper.
* A stream, referenced as "scheme://target".
*
* @return \Drupal\Core\StreamWrapper\StreamWrapperInterface|bool
* A stream wrapper object, or false if the scheme is not available.
* Returns a new stream wrapper object appropriate for the given URI or
* FALSE 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).
*/
public function getViaUri($uri);
/**
* Returns the stream wrapper class.
* Returns the stream wrapper class name for a given scheme.
*
* @param string $scheme
* The stream wrapper scheme.
* Stream scheme.
*
* @return string|bool
* The stream wrapper class, or false if the scheme does not exist.
* Return string if a scheme has a registered handler, or FALSE.
*/
public function getClass($scheme);