You are here

public function MediaInternetOEmbedHandler::getFileObject in oEmbed 7.0

Same name and namespace in other branches
  1. 8 MediaInternetOEmbedHandler.inc \MediaInternetOEmbedHandler::getFileObject()
  2. 7 MediaInternetOEmbedHandler.inc \MediaInternetOEmbedHandler::getFileObject()

Returns a file object which can be used for validation

Return value

StdClass

1 call to MediaInternetOEmbedHandler::getFileObject()
MediaInternetOEmbedHandler::validate in ./MediaInternetOEmbedHandler.inc
File should not validate if we cannot fetch valid oEmbed data.

File

./MediaInternetOEmbedHandler.inc, line 54
MediaInternetOEmbedHandler.inc

Class

MediaInternetOEmbedHandler
Implementation of MediaInternetBaseHandler.

Code

public function getFileObject() {
  if (!$this->fileObject) {
    $file = oembed_url_to_file($this->embedCode);
    $this->fileObject = $file;
  }
  return $this->fileObject;
}