private function _exportComment($text = '')
{
if (isset($GLOBALS['sql_include_comments']) && $GLOBALS['sql_include_comments']) {
// see https://dev.mysql.com/doc/refman/5.0/en/ansi-diff-comments.html
if (empty($text)) {
return '--' . $GLOBALS['crlf'];
} else {
$lines = preg_split("/\\r\\n|\\r|\\n/", $text);
$result = array();
foreach ($lines as $line) {
$result[] = '-- ' . $line . $GLOBALS['crlf'];
}
return implode('', $result);
}
} else {
return '';
}
}