You are here

public function MediaInternetVimeoHandler::getFileObject in Media: Vimeo 7

Same name and namespace in other branches
  1. 7.2 includes/MediaInternetVimeoHandler.inc \MediaInternetVimeoHandler::getFileObject()

File

includes/MediaInternetVimeoHandler.inc, line 35

Class

MediaInternetVimeoHandler
Implementation of MediaInternetBaseHandler.

Code

public function getFileObject() {
  $uri = $this
    ->parse($this->embedCode);
  $file = file_uri_to_object($uri, TRUE);

  // Try to default the file name to the video's title.
  if (empty($file->fid) && ($info = $this
    ->getOEmbed())) {
    $file->filename = truncate_utf8($info['title'], 255);
  }
  return $file;
}