Alias for write()

@param string   $text
@param null|int $color
@param null|int $bgColor

@return void
328517
public function writeText($text, $color = null, $bgColor = null)
    {
        $this->adapter->writeText($text, $color, $bgColor);
    }
793711
public function verbose($text, $type = 'stdout')
    {
        if (isset($_ENV[ 'VERBOSE' ]) and $_ENV[ 'VERBOSE' ] === true) {
            $this->write($text, $type);
        }
    }
847549
public void write(String text) throws IOException {
        file.getParentFile().mkdirs();
        AtomicFileWriter w = new AtomicFileWriter(file);
        try {
            w.write(text);
            w.commit();
        } finally {
            w.abort();
        }
    }
203066
public function write(string $text, bool $eol = false): self
    {
        list($method, $this->method) = [$this->method ?: 'line', ''];

        $text  = $this->colorizer->{$method}($text, []);
        $error = \stripos($method, 'error') !== false;

        if ($eol) {
            $text .= \PHP_EOL;
        }

        return $this->doWrite($text, $error);
    }
593237
public function write(&$text)
    {
        $text = str_replace(
            array_keys($this->_alias_write),
            array_values($this->_alias_write),
            $text);

        return $this;
    }
234356
protected function assignTextStyle(string $color)
    {
        if (in_array($color, $this->supported_text_styles) === true) {
            $this->text_color = $color;
        }
    }
45014
public function write($text, $params=array())
    {
        $color = (isset($params['color'])) ?  $params['color'] : array(0, 0, 0);
        $color = imagecolorallocate($this->edited, $color[0], $color[1], $color[2]);
        $size = (isset($params['size']))? $params['size'] : 5;
        $x = (isset($params['x']))? $params['x'] : 2;
        $y = (isset($params['y']))? $params['y'] : 2;


        imagestring($this->edited, $size, $x, $y, $text, $color);
    }
872643
public function write($text, $color = '', $useclass = true)
    {
        $style    = $this->getStyle($this->getCurrentStyle());
        $htmlcode = '<span dir="' . I18N::direction() . '"';
        if ($useclass) {
            $htmlcode .= ' class="' . $style['name'] . '"';
        }
        if (!empty($color)) {
            // Check if Text Color is set and if it’s valid HTML color
            if (preg_match('/#?(..)(..)(..)/', $color)) {
                $htmlcode .= ' style="color:' . $color . ';"';
            }
        }

        $htmlcode .= '>' . $text . '</span>';
        $htmlcode = str_replace([
            "\n",
            '> ',
            ' <',
        ], [
            '<br>',
            '>&nbsp;',
            '&nbsp;<',
        ], $htmlcode);
        echo $htmlcode;
    }
48292
protected function assignBgStyle(string $color)
    {
        if (in_array($color, $this->supported_bg_styles) === true) {
            $this->bg_color = $color;
        }
    }
1082392
public function setTextColor($r, $g, $b)
    {
        $this->textColor = array($r, $g, $b);

        return $this;
    }
1154372
protected function write(string $string, int $writer = Output::STANDARD): void
	{
		$this->output->writeLn($string, $writer);
	}
69289
public static function color($text, $color)
    {
        if (isset(ShellTool::$colors[$color])) {
            return ShellTool::$colors[$color]['start'] . $text . ShellTool::$colors[$color]['close'];
        } else {
            return $text;
        }
    }
229138
public function colorize($string, $color = null, $bgColor = null)
    {
        return $this->adapter->colorize($string, $color, $bgColor);
    }
7648
public static function line( $str, $color = null, $background = null ) 
	{
		if ( is_array( $str ) ) 
		{
			$str = implode( PHP_EOL, $str );
		}
		
		static::write( $str.PHP_EOL, $color, $background );
	}
56963
public function setText(string $text): void
    {
        $this->text = $text;

        if ( ! is_null($this->encode)) {
            $text = $this->encode->convert($text);

            // remember the conversion
            $this->convertedText = $text;
        }
    }
1073798
public static function writeln($text = '', $text_color = null, $bg_color = null)
    {
        self::write("{$text}\n", $text_color, $bg_color);
    }
1300115
def write(self, text, fg='black', bg='white'):
        ''''''
        if isinstance(text, str):
            sys.stdout.write(text)
        else:
            sys.stdout.write(str(text))
        sys.stdout.flush()
        if self.udp.connected():
            self.udp.writeln(text)
        if self.tcp.connected():
            self.tcp.writeln(text)