diff options
author | Dries Buytaert <dries@buytaert.net> | 2010-08-17 16:29:16 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2010-08-17 16:29:16 +0000 |
commit | ed125d485feadc16f1ea1fa78d660b65283c5043 (patch) | |
tree | 377b10f65906b4993b14b69e6f94820fb41050f8 /includes/stream_wrappers.inc | |
parent | a25b60541dad30baa72736a3b00c1a0267b6e1e8 (diff) | |
download | brdo-ed125d485feadc16f1ea1fa78d660b65283c5043.tar.gz brdo-ed125d485feadc16f1ea1fa78d660b65283c5043.tar.bz2 |
- Patch #858528 by Damien Tournoud, chx: file_uri_target() purpose is unclear.
Diffstat (limited to 'includes/stream_wrappers.inc')
-rw-r--r-- | includes/stream_wrappers.inc | 35 |
1 files changed, 15 insertions, 20 deletions
diff --git a/includes/stream_wrappers.inc b/includes/stream_wrappers.inc index 553628912..a78374c96 100644 --- a/includes/stream_wrappers.inc +++ b/includes/stream_wrappers.inc @@ -146,24 +146,6 @@ interface DrupalStreamWrapperInterface extends StreamWrapperInterface { public function getExternalUrl(); /** - * Returns the local writable target of the resource within the stream. - * - * This function should be used in place of calls to realpath() or similar - * functions when attempting to determine the location of a file. While - * functions like realpath() may return the location of a read-only file, this - * method may return a URI or path suitable for writing that is completely - * separate from the URI used for reading. - * - * @param $uri - * Optional URI. - * - * @return - * Returns a string representing a location suitable for writing of a file, - * or FALSE if unable to write to the file such as with read-only streams. - */ - public function getTarget($uri = NULL); - - /** * Returns the MIME type of the resource. * * @param $uri @@ -286,9 +268,22 @@ abstract class DrupalLocalStreamWrapper implements DrupalStreamWrapperInterface } /** - * Base implementation of getTarget(). + * Returns the local writable target of the resource within the stream. + * + * This function should be used in place of calls to realpath() or similar + * functions when attempting to determine the location of a file. While + * functions like realpath() may return the location of a read-only file, this + * method may return a URI or path suitable for writing that is completely + * separate from the URI used for reading. + * + * @param $uri + * Optional URI. + * + * @return + * Returns a string representing a location suitable for writing of a file, + * or FALSE if unable to write to the file such as with read-only streams. */ - function getTarget($uri = NULL) { + protected function getTarget($uri = NULL) { if (!isset($uri)) { $uri = $this->uri; } |