PUBLIC_PATH
PUBLIC_PATH
deleteFileEntity(\Media\Entity\File $file)
Deletes File entity
| \Media\Entity\File | $file |
deleteObjectFileEntity(\Media\Entity\File $file)
Deletes ObjectFile entity
| \Media\Entity\File | $file |
createFile(\Media\Form\FileUpload $form, $object) : \Media\Entity\File
Creates file using sub-methods to write file and to associate it with an object
| \Media\Form\FileUpload | $form | |
| $object |
associateFileWithObject(\Media\Entity\File $file, $object)
Makes an association between a created file and an entity. It means, that the object file be the owner of the file
| \Media\Entity\File | $file | |
| $object |
writeFile(\Media\Form\FileUpload $form) : \Media\Entity\File
Writes file to a DB and moves it to an appropriate path
| \Media\Form\FileUpload | $form |
convertFile(\Media\Entity\File $file) : \Media\Entity\File
Converts file according to its type
| \Media\Entity\File | $file |
videoPath( $id, $ext, boolean $from = \Media\Service\File::FROM_ROOT) : string
Returns a path to a video file from root directory of a project (perfect choice for processing file) or from public directory (perfect choice for displaying a link) using predefined constants in Media\Service\File
| $id | ||
| $ext | ||
| boolean | $from |
convertVideo(\Media\Service\File $videoEntity, string $newExtension = self::MP4_EXT, integer $bitrate = 300) : \Media\Service\File
Prepares all necessary data for converting video file and calls "executeConversion" method
| \Media\Service\File | $videoEntity | |
| string | $newExtension | |
| integer | $bitrate |