/** * media 객체로 반환 * * @param File $file file instance * @return Video * @throws NotAvailableException */ public function make(File $file) { if ($this->isAvailable($file->getMime()) !== true) { throw new NotAvailableException(); } if (!($meta = $this->repo->find($file->getId()))) { $meta = $this->extractInformation($file); $meta->dataEncode(Video::getJsonType()); $meta = $this->repo->insert($meta); } return $this->createModel($file, $meta); }