public function url($cached = FALSE, $useSSL = TRUE) {

    if ($cached && !empty($this->cdnUrl)) {
      return $useSSL ? $this->cdnSslUrl : $this->cdnUrl;
    }
    return $this->url;
  }
public function url($cached = FALSE, $useSSL = TRUE) {

    if ($cached && !empty($this->cdnUrl)) {
      return $useSSL ? $this->cdnSslUrl : $this->cdnUrl;
    }
    return $this->url;
  }
public function url ( $ cached = FALSE , $ useSSL = TRUE ) { if ( $ cached && ! empty ( $ this -> cdnUrl ) ) { return $ useSSL ? $ this -> cdnSslUrl : $ this -> cdnUrl ; } return $ this -> url ; }
Get the URL to this object.

If this object has been stored remotely, it will have
a valid URL.

@param boolean $cached
If this value is set to TRUE, this call *may* return the
URL to a cached (CDN) URL. Reading from a cached URL should
be substantially faster than reading from a normal URL. Note,
however, that a container must have CDN enabled on it before
caching can be used, and a CDN must be passed into this
object. See ObjectStorage::useCDN(), Container::useCDN() and
RemoteObject::useCDN(). (Generally, using ObjectStorage::useCDN()
is all you need to do.)
@param boolean $useSSL
FOR CACHED URLS ONLY, there is an option for either SSL or non-SSL
URLs. By default, we use SSL URLs because (a) it's safer, and
(b) it mirrors non-CDN behavior. This can be turned off by setting
$useSSL to FALSE.
@retval string
@return string
A URL to the object. The following considerations apply:
- If the container is public, this URL can be loaded without
authentication. You can, for example, pass the URL to a browser
user agent.
- If a CDN URL has been provided to useCDN() and $cached is TRUE...
- If the container is CDN enabled, a URL to the cache will be returned.
- Otherwise, the Swift URL will be returned.
- If this object has never been saved remotely, then there will be
no URL, and this will return NULL.
Get the URL to this object .