You are here

class MediaFlickrStreamWrapper in Media: Flickr 7

Same name in this branch
  1. 7 MediaFlickrStreamWrapper.inc \MediaFlickrStreamWrapper
  2. 7 includes/MediaFlickrStreamWrapper.inc \MediaFlickrStreamWrapper
Same name and namespace in other branches
  1. 7.2 includes/MediaFlickrStreamWrapper.inc \MediaFlickrStreamWrapper

Create an instance like this: $youtube = new ResourceYouTubeStreamWrapper('flickr://u/[user-code]/p/[photo-code]');

Hierarchy

Expanded class hierarchy of MediaFlickrStreamWrapper

1 string reference to 'MediaFlickrStreamWrapper'
media_flickr_stream_wrappers in ./media_flickr.module
Create stream wrapper for Flickr videos.

File

./MediaFlickrStreamWrapper.inc, line 13
Dummy placeholder; moved to /includes. This is here to avert a WSOD on update prior to 7001.

View source
class MediaFlickrStreamWrapper extends MediaReadOnlyStreamWrapper {
  protected $base_url = 'https://www.flickr.com/';
  public function interpolateUrl() {
    if (isset($this->parameters['p'])) {
      return $this->base_url . 'photos/' . check_plain($this->parameters['u']) . '/' . check_plain($this->parameters['p']);
    }
  }
  public function getTarget($f) {
    return FALSE;
  }
  public static function getMimeType($uri, $mapping = NULL) {
    return 'image/jpeg';
  }

}

Members