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 |
audioPath( $id, $ext, boolean $from = \Media\Service\File::FROM_ROOT) : string
Returns a path to an audio 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 | (Id of an audio file) |
|
$ext | (Extension of a file) |
|
boolean | $from | (Can be FROM_ROOT or FROM_PUBLIC) |
convertAudio(\Media\Service\File $audioEntity, string $newExtension = self::MP3_EXT) : \Media\Service\File
Prepares all necessary data for converting audio file and calls "executeConversion" method
\Media\Service\File | $audioEntity | |
string | $newExtension |