You are here

class ResourcePrivateStreamWrapper in D7 Media 6

private:// stream wrapper class.

Hierarchy

Expanded class hierarchy of ResourcePrivateStreamWrapper

1 string reference to 'ResourcePrivateStreamWrapper'
resource_init in resource/resource.module
Implementation of hook_init().

File

resource/ResourcePrivateStreamWrapper.inc, line 6

View source
class ResourcePrivateStreamWrapper extends ResourcePublicStreamWrapper {
  private $pathKey = 'stream_private_path';
  private $pathDefault = 'sites/default/files-private';

  /**
   * Return the HTML Url of a private file.
   */
  function htmlUrl($url) {
    $basepath = variable_get($this->pathKey, $this->pathDefault);
    return url('system/files/' . parse_url($url, PHP_URL_PATH), array(
      'absolute' => TRUE,
    ));
  }

}

Members

Namesort descending Modifiers Type Description Overrides
ResourcePrivateStreamWrapper::$pathDefault private property Overrides ResourcePublicStreamWrapper::$pathDefault
ResourcePrivateStreamWrapper::$pathKey private property Overrides ResourcePublicStreamWrapper::$pathKey
ResourcePrivateStreamWrapper::htmlUrl function Return the HTML Url of a private file. Overrides ResourcePublicStreamWrapper::htmlUrl
ResourcePublicStreamWrapper::interpolateUrl function Interpolate the url path, adding the public files path. Overrides ResourceStreamWrapper::interpolateUrl
ResourcePublicStreamWrapper::mime function Return the mime type of a file. Overrides ResourceStreamWrapper::mime
ResourceStreamWrapper::$handle private property
ResourceStreamWrapper::dir_closedir public function Support for closedir(). Overrides StreamWrapperInterface::dir_closedir
ResourceStreamWrapper::dir_opendir public function Support for opendir(). Overrides StreamWrapperInterface::dir_opendir
ResourceStreamWrapper::dir_readdir public function Support for readdir(). Overrides StreamWrapperInterface::dir_readdir
ResourceStreamWrapper::dir_rewinddir public function Support for rewinddir(). Overrides StreamWrapperInterface::dir_rewinddir
ResourceStreamWrapper::mkdir public function Support for mkdir(). Overrides StreamWrapperInterface::mkdir
ResourceStreamWrapper::rename public function Support for rename(). Overrides StreamWrapperInterface::rename
ResourceStreamWrapper::rmdir public function Support for rmdir(). Overrides StreamWrapperInterface::rmdir
ResourceStreamWrapper::stream_close public function Support for fclose(). Overrides StreamWrapperInterface::stream_close
ResourceStreamWrapper::stream_eof public function Support for feof(). Overrides StreamWrapperInterface::stream_eof
ResourceStreamWrapper::stream_flush public function Support for fflush(). Overrides StreamWrapperInterface::stream_flush
ResourceStreamWrapper::stream_lock function Overrides StreamWrapperInterface::stream_lock
ResourceStreamWrapper::stream_open public function Support for fopen(), file_get_contents(), file_put_contents() etc. Overrides StreamWrapperInterface::stream_open
ResourceStreamWrapper::stream_read public function Support for fread(), file_get_contents() etc. Overrides StreamWrapperInterface::stream_read
ResourceStreamWrapper::stream_seek public function Support for fseek(). Overrides StreamWrapperInterface::stream_seek
ResourceStreamWrapper::stream_stat public function Support for fstat(). Overrides StreamWrapperInterface::stream_stat
ResourceStreamWrapper::stream_tell public function Support for ftell(). Overrides StreamWrapperInterface::stream_tell
ResourceStreamWrapper::stream_write public function Support for fwrite(), file_put_contents() etc. Overrides StreamWrapperInterface::stream_write
ResourceStreamWrapper::unlink public function Support for unlink(). Overrides StreamWrapperInterface::unlink
ResourceStreamWrapper::url_stat public function Support for stat(). Overrides StreamWrapperInterface::url_stat