public function flush() { if ($this->printer == null) { throw new LogicException("Not attached to a printer."); } }