You are here

function ResourcePublicStreamWrapper::htmlUrl in D7 Media 6

Return the HTML Url of a public file.

Overrides ResourceStreamWrapper::htmlUrl

1 method overrides ResourcePublicStreamWrapper::htmlUrl()
ResourcePrivateStreamWrapper::htmlUrl in resource/ResourcePrivateStreamWrapper.inc
Return the HTML Url of a private file.

File

resource/ResourcePublicStreamWrapper.inc, line 18

Class

ResourcePublicStreamWrapper
public:// stream wrapper class.

Code

function htmlUrl($url) {
  $basepath = variable_get($this->pathKey, $this->pathDefault);
  $path = parse_url($url, PHP_URL_PATH);
  return $GLOBALS['base_url'] . '/' . $basepath . '/' . str_replace('\\', '/', $path);
}