ManaPHP\Cli\Console::write PHP Method

write() public method

public write ( string $str, array $context = [] ) : static
$str string
$context array
return static
    public function write($str, $context = [])
    {
        if (count($context) === 0) {
            echo $str;
        } else {
            $replaces = [];
            foreach ($context as $k => $v) {
                $replaces[':' . $k] = $v;
            }
            echo strtr($str, $replaces);
        }
        return $this;
    }