Lambda-lib
[ class tree: Lambda-lib ] [ index: Lambda-lib ] [ all elements ]

Class: Mime

Source Location: /libs/Mime.php

Class Overview


Mime class


Author(s):

  • rooth

Version:

  • 0.0.1

    PHP version 5

Variables

Methods



Class Details

[line 12]
Mime class



Tags:

author:  rooth
version:  

0.0.1

PHP version 5



[ Top ]


Class Variables

static $map = array(
        'txt'   => 'text/plain',
        'csv'   => 'text/csv',
        'xml'   => 'text/xml',
        'html'  => 'text/html',
        'htm'   => 'text/html',
        'gif'   => 'image/gif',
        'jpg'   => 'image/jpeg',
        'jpg'   => 'image/pjpeg',
        'jpeg'  => 'image/jpeg',
        'png'   => 'image/png',
        'png'   => 'image/x-png',
        'tif'   => 'image/tiff',
        'tiff'  => 'image/tiff',
        'bmp'   => 'image/x-bmp',
        'ps'    => 'appilcation/postscript',
        'eps'   => 'appilcation/postscript',
        'epsf'  => 'appilcation/postscript',
        'ai'    => 'application/postscript',
        'zip'   => 'application/zip',
        'lzh'   => 'application/x-lzh',
        'lha'   => 'application/octet-stream',
        'tar'   => 'application/x-tar',
        'gzip'  => 'application/x-tar',
        'cpt'   => 'application/mac-compactpro',
        'doc'   => 'application/msword',
        'docx'  => 'application/vnd.openxmlformats-officedocument.wordprocessingml.document',
        'xls'   => 'application/vnd.ms-excel',
        'xlsx'  => 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',
        'ppt'   => 'application/vnd.ms-powerpoint',
        'pptx'  => 'application/vnd.openxmlformats-officedocument.presentationml.presentation',
        'rtf'   => 'application/rtf',
        'pdf'   => 'application/pdf',
        'css'   => 'application/css',
        'au'    => 'audio/basic',
        'rpm'   => 'audio/x-pn-realaudio-plugin',
        'swa'   => 'application/x-director',
        'mp3'   => 'audio/mpeg',
        'mp4'   => 'audio/mp4',
        'wav'   => 'audio/x-wav',
        'midi'  => 'audio/midi',
        'avi'   => 'vide/x-msvideo',
        'mpeg'  => 'video/mpeg',
        'mpg'   => 'video/mpeg',
        'wmv'   => 'video/x-ms-wmv',
        'flash' => 'application/x-shockwave-flash',
        'exe'   => 'application/octet-stream',
        'hqx'   => 'application/mac-binhex40',
        'cpt'   => 'application/mac-compactpro',
        'php'   => 'application/x-httpd-php',
        'php4'  => 'application/x-httpd-php',
        'php3'  => 'application/x-httpd-php',
        'phtml' => 'application/x-httpd-php',
        'phps'  => 'application/x-httpd-php-source',
        'js'    => 'application/x-javascript',
        'swf'   => 'application/x-shockwave-flash',
        'eml'   => 'message/rfc822',
        '3gpp'  => 'video/3gpp',                        // docomo chaku-uta,movie
        '3gp'   => 'video/3gpp',                        // docomo chaku-uta,movie
        'amr'   => 'video/3gpp',                        // docomo chaku-uta,movie
        'asf'   => 'video/3gpp',                        // docomo chaku-uta,movie
        'jam'   => 'application/x-jam',                 // docomo i-appli
        'dmt'   => 'application/x-decomail-template',   // docomo decoration mail template
        'hdml'  => 'text/x-hdml',                       // au, docomo HDML
        '3gpp2' => 'video/3gpp2',                       // au chaku-uta,ez-movie
        '3g2'   => 'video/3gpp2',                       // au chaku-uta,ez-movie
        'amc'   => 'video/3gpp2',                       // au chaku-uta,ez-movie
        'kjx'   => 'application/x-kjx',                 // au ez-appli
        'khm'   => 'application/x-kddi-htmlmail',       // au decoration mail template
        'mmf'   => 'application/x-smaf ',               // softbank chakumero
        'smaf'  => 'application/x-smaf',                // softbank chakumero
        'hmt'   => 'application/x-htmlmail-template',   // softbank decoration mail template
        'jar'   => 'application/java-archive',          // java appli
        'jad'   => 'text/vnd.sun.j2me.app-descriptor',  // java appli
    )

[line 14]



Tags:

access:  protected

Type:   mixed


[ Top ]



Class Methods


static method getExtension [line 114]

static string getExtension( string $mimetype, [string $fname = ''])

拡張子 返却



Tags:

return:  拡張子
access:  public


Parameters:

string   $mimetype   マイムタイプ
string   $fname   ファイル名 ※マイムタイプから検出できなかった時、ファイル名の拡張子を返却

[ Top ]

static method getType [line 97]

static string getType( string $extension)

マイムタイプ 返却



Tags:

return:  マイムタイプ
access:  public


Parameters:

string   $extension   拡張子

[ Top ]


Documentation generated on Sat, 21 May 2011 18:34:08 +0900 by phpDocumentor 1.4.1