/**
  * Return a publicly accessable location of a file.
  * If not present, will return the placeholder
  *
  * @param string $file
  * @param string $type, one of Server::URL_HTTP, Server::URL_SSL, Server::URL_STREAMING
  * @return string
  **/
 public function url($file, $type = NULL)
 {
     if (!$this->is_file($file)) {
         return $this->placeholder();
     }
     return parent::url($file, $type);
 }
Example #2
0
 /**
  * Return a publicly accessable location of a file.
  * If not present, try shoing from fallback server
  *
  * @param string $file
  * @param string $type, one of Server::URL_HTTP, Server::URL_SSL, Server::URL_STREAMING
  * @return string
  **/
 public function url($file, $type = NULL)
 {
     if (!$this->is_file($file) and $this->fallback()) {
         return $this->fallback()->url($file, $type);
     }
     return parent::url($file, $type);
 }