yii\helpers\BaseFileHelper::loadMimeTypes PHP 메소드

loadMimeTypes() 보호된 정적인 메소드

Loads MIME types from the specified file.
protected static loadMimeTypes ( string $magicFile ) : array
$magicFile string the path (or alias) of the file that contains all available MIME type information. If this is not set, the file specified by [[mimeMagicFile]] will be used.
리턴 array the mapping from file extensions to MIME types
    protected static function loadMimeTypes($magicFile)
    {
        if ($magicFile === null) {
            $magicFile = static::$mimeMagicFile;
        }
        $magicFile = Yii::getAlias($magicFile);
        if (!isset(self::$_mimeTypes[$magicFile])) {
            self::$_mimeTypes[$magicFile] = (require $magicFile);
        }
        return self::$_mimeTypes[$magicFile];
    }