src/Sulu/Bundle/MediaBundle/Entity/FileVersion.php
public function getExtension()
    {
        $pathInfo = pathinfo($this->getName());
        $extension = ExtensionGuesser::getInstance()->guess($this->getMimeType());
        if ($extension) {
            return $extension;
        } elseif (isset($pathInfo['extension'])) {
            return $pathInfo['extension'];
        }

        return null;
    }
public function getExtension()
    {
        $pathInfo = pathinfo($this->getName());
        $extension = ExtensionGuesser::getInstance()->guess($this->getMimeType());
        if ($extension) {
            return $extension;
        } elseif (isset($pathInfo['extension'])) {
            return $pathInfo['extension'];
        }

        return null;
    }
public function getExtension ( ) { $ pathInfo = pathinfo ( $ this -> getName ( ) ) ; $ extension = ExtensionGuesser :: getInstance ( ) -> guess ( $ this -> getMimeType ( ) ) ; if ( $ extension ) { return $ extension ; } elseif ( isset ( $ pathInfo [ 'extension' ] ) ) { return $ pathInfo [ 'extension' ] ; } return null ; }
Get extension.

@return null|string
Get extension .