core/classes/FileHelper.class.php
public function getMimeTypeByExtension($path){

        if(!$this->mimeCache){
            $this->mimeCache = require \App::getAlias('disco.mime');
        }//if

        if(isset($this->mimeCache[$this->getExtension($path)])){
            return $this->mimeCache[$this->getExtension($path)];
        }//if

        return null;

    }
public function getMimeTypeByExtension($path){

        if(!$this->mimeCache){
            $this->mimeCache = require \App::getAlias('disco.mime');
        }//if

        if(isset($this->mimeCache[$this->getExtension($path)])){
            return $this->mimeCache[$this->getExtension($path)];
        }//if

        return null;

    }
public function getMimeTypeByExtension ( $ path ) { if ( ! $ this -> mimeCache ) { $ this -> mimeCache = require \ App :: getAlias ( 'disco.mime' ) ; } //if if ( isset ( $ this -> mimeCache [ $ this -> getExtension ( $ path ) ] ) ) { return $ this -> mimeCache [ $ this -> getExtension ( $ path ) ] ; } //if return null ; }
Get a file extension type based on the file MIME info.


@param string $path The file.

@return null|string The extension.
Get a file extension type based on the file MIME info .