We are no longer offering accounts on this server. Consider https://gitlab.freedesktop.org/ as a place to host projects.

Commit 999175d7 authored by mattl's avatar mattl

File_oembed::byFile to avoid littering with getKV

parent 97bf4708
......@@ -80,6 +80,17 @@ class File_oembed extends Managed_DataObject
* Fetch an entry by using a File's id
static function byFile(File $file) {
$file_oembed = self::getKV('file_id', $file->id);
if (!$file_oembed instanceof File_oembed) {
throw new ServerException(sprintf('No File_oembed entry for File id==%u', $file->id));
return $file_oembed;
public function getUrl()
return $this->url;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment