public function writeln($text = '', $pipe = TextWriter::STDOUT) { $this->textWriter->writeln($text, $pipe); return $this; }
public static function test() { $out = new Console(); $singleton1 = Singleton::getInstance('Singleton 1'); $singleton2 = Singleton::getInstance('Singleton 2'); $out->writeln($singleton1->getName()); $out->writeln($singleton2->getName()); }