public function getTypeByExtension($extension)
    {
        if ($this->isValidExtension($extension)) {

            // We get back flipped copy
            $list = $this->getList(true);
            return $list[$extension];

        } else {

            // For all unknown extensions, the default Mime-Type is used
            return 'application/octet-stream';
        }
    }
public function getTypeByExtension($extension)
    {
        if ($this->isValidExtension($extension)) {

            // We get back flipped copy
            $list = $this->getList(true);
            return $list[$extension];

        } else {

            // For all unknown extensions, the default Mime-Type is used
            return 'application/octet-stream';
        }
    }
public function getTypeByExtension ( $ extension ) { if ( $ this -> isValidExtension ( $ extension ) ) { // We get back flipped copy $ list = $ this -> getList ( true ) ; return $ list [ $ extension ] ; } else { // For all unknown extensions, the default Mime-Type is used return 'application/octet-stream' ; } }
Finds associated type by its extension

@param string $extension
@return string
Finds associated type by its extension