PartKeepr\UploadedFileBundle\Entity\UploadedFile::getLegacyExtension PHP Метод

getLegacyExtension() публичный Метод

This function simply extracts that information from the mime type; special cases are not handled. e.g. if you have image/foobar, it would return "foobar" as extension.
Устаревший:
public getLegacyExtension ( ) : string
Результат string The extension
    public function getLegacyExtension()
    {
        $data = explode('/', $this->getMimeType());
        if (array_key_exists(1, $data)) {
            return $data[1];
        } else {
            return 'undefined';
        }
    }