/** * 格式化文本 * * @param string $text * * @return string */ public function format($text) { $lines = explode("\n", $text); foreach ($lines as &$line) { $line = $this->quote . str_repeat(' ', $this->indent) . $line; } return Colour::colour(implode("\n", $lines), $this->foregroundColors, $this->backgroundColors); }