PMA\libraries\plugins\export\ExportXml::_exportDefinitions PHP Метод

_exportDefinitions() приватный Метод

Generates output for SQL defintions
private _exportDefinitions ( string $db, string $type, string $dbitype, array $names ) : string
$db string Database name
$type string Item type to be used in XML output
$dbitype string Item type used in DBI qieries
$names array Names of items to export
Результат string XML with definitions
    private function _exportDefinitions($db, $type, $dbitype, $names)
    {
        global $crlf;
        $head = '';
        if ($names) {
            foreach ($names as $name) {
                $head .= '            <pma:' . $type . ' name="' . htmlspecialchars($name) . '">' . $crlf;
                // Do some formatting
                $sql = $GLOBALS['dbi']->getDefinition($db, $dbitype, $name);
                $sql = htmlspecialchars(rtrim($sql));
                $sql = str_replace("\n", "\n                ", $sql);
                $head .= "                " . $sql . $crlf;
                $head .= '            </pma:' . $type . '>' . $crlf;
            }
        }
        return $head;
    }