Sulu\Bundle\MediaBundle\Media\Manager\MediaManager::getProperties PHP Метод

getProperties() приватный Метод

private getProperties ( Symfony\Component\HttpFoundation\File\UploadedFile $uploadedFile ) : array
$uploadedFile Symfony\Component\HttpFoundation\File\UploadedFile
Результат array
    private function getProperties(UploadedFile $uploadedFile)
    {
        $mimeType = $uploadedFile->getMimeType();
        $properties = [];
        try {
            // if the file is a video we add the duration
            if (fnmatch('video/*', $mimeType)) {
                $properties['duration'] = $this->ffprobe->format($uploadedFile->getPathname())->get('duration');
            }
        } catch (ExecutableNotFoundException $e) {
            // Exception is thrown if ffmpeg is not installed -> duration is not set
        }
        return $properties;
    }