PMA\libraries\DisplayResults::_setMimeMap PHP Méthode

_setMimeMap() private méthode

Sets the MIME details of the columns in the results set
private _setMimeMap ( ) : void
Résultat void
    private function _setMimeMap()
    {
        $fields_meta = $this->__get('fields_meta');
        $mimeMap = array();
        $added = array();
        for ($currentColumn = 0; $currentColumn < $this->__get('fields_cnt'); ++$currentColumn) {
            $meta = $fields_meta[$currentColumn];
            $orgFullTableName = $this->__get('db') . '.' . $meta->orgtable;
            if ($GLOBALS['cfgRelation']['commwork'] && $GLOBALS['cfgRelation']['mimework'] && $GLOBALS['cfg']['BrowseMIME'] && !$_SESSION['tmpval']['hide_transformation'] && empty($added[$orgFullTableName])) {
                $mimeMap = array_merge($mimeMap, PMA_getMIME($this->__get('db'), $meta->orgtable, false, true));
                $added[$orgFullTableName] = true;
            }
        }
        // special browser transformation for some SHOW statements
        if ($this->__get('is_show') && !$_SESSION['tmpval']['hide_transformation']) {
            preg_match('@^SHOW[[:space:]]+(VARIABLES|(FULL[[:space:]]+)?' . 'PROCESSLIST|STATUS|TABLE|GRANTS|CREATE|LOGS|DATABASES|FIELDS' . ')@i', $this->__get('sql_query'), $which);
            if (isset($which[1])) {
                $str = ' ' . strtoupper($which[1]);
                $isShowProcessList = strpos($str, 'PROCESSLIST') > 0;
                if ($isShowProcessList) {
                    $mimeMap['..Info'] = array('mimetype' => 'Text_Plain', 'transformation' => 'output/Text_Plain_Sql.php');
                }
                $isShowCreateTable = preg_match('@CREATE[[:space:]]+TABLE@i', $this->__get('sql_query'));
                if ($isShowCreateTable) {
                    $mimeMap['..Create Table'] = array('mimetype' => 'Text_Plain', 'transformation' => 'output/Text_Plain_Sql.php');
                }
            }
        }
        $this->__set('mime_map', $mimeMap);
    }
DisplayResults