public function write() { if ($this->textWriter === null) { throw new ConsoleException('No TextWriter object specified'); } $this->textWriter->write($this->render()); return $this; }