@param Writer $writer

@throws \PhpOffice\PhpSpreadsheet\Exception
@throws \PhpOffice\PhpSpreadsheet\Reader\Exception
544967
public function handle(Writer $writer)
    {
        $writer = $writer->reopen($this->temporaryFile, $this->writerType);

        $sheet = $writer->getSheetByIndex($this->sheetIndex);

        $sheet->appendRows($this->data, $this->sheetExport);

        $writer->write($this->sheetExport, $this->temporaryFile, $this->writerType);
    }
139567
protected function xmlSerializeValue(Xml\Writer $writer)
    {
        $valueType = strtolower($this->getValueType());

        foreach ($this->getJsonValue() as $values) {
            foreach ((array) $values as $value) {
                $writer->writeElement($valueType, $value);
            }
        }
    }
739504
protected function resolve($writer)
    {
        $resolver = 'resolve' . ucwords(gettype($writer)) . 'Writer';

        if (method_exists($this, $resolver) && $resolved = $this->{$resolver}($writer)) {
            return $resolved;
        }

        $this->handleUnknownWriter($writer);
    }
500981
public void write(PrintWriter writer, Janitor janitor) {
        write(writer,janitor,warnings,"warning");
        write(writer,janitor,errors,"error");
    }
855990
public void setOutputWriter(Writer writer) {
        if (writer instanceof PrintWriter) {
            this.out = (PrintWriter) writer;
        } else if (writer == null) {
            this.out = null;
        } else {
            this.out = new PrintWriter(writer);
        }
    }
657072
public function handleType(Writer $buffer): void
    {
        $serializer = $this->serializers[$this->transaction['type']];

        (new $serializer($this->transaction, $buffer))->serialize();
    }
1007197
public function writeTable(WriterInterface $writer)
    {
        if (!$this->isExternal()) {
            $this->getColumns()->write($writer);
            $this->getIndices()->write($writer);
            $this->getForeignKeys()->write($writer);

            return self::WRITE_OK;
        }

        return self::WRITE_EXTERNAL;
    }
1289855
protected function xmlSerializeValue(Xml\Writer $writer)
    {
        // xCard is the only XML and JSON format that has the same date and time
        // format than vCard.
        $valueType = strtolower($this->getValueType());
        $writer->writeElement($valueType, $this->getValue());
    }
1004611
public function process( ezcMvcResponseWriter $writer )
    {
        if ( $writer instanceof ezcMvcHttpResponseWriter )
        {
            $writer->headers['HTTP/1.1 ' . ezpOauthErrorType::httpCodeforError( $this->errorType )] = "";
            $writer->headers['WWW-Authenticate'] = "OAuth realm='{$this->realm}'{$this->createErrorString()}";
        }

        if ( isset( $this->errorType) )
        {
            $writer->headers['Content-Type'] = 'application/json; charset=UTF-8';
            $body = array( 'error' => $this->errorType );

            if ( isset( $this->errorMessage ) )
                $body['error_description'] = $this->errorMessage;

            $writer->response->body = json_encode( $body );
        }
    }
1335841
public function xmlSerialize(Xml\Writer $writer)
    {
        $parameters = [];

        foreach ($this->parameters as $parameter) {
            if ('VALUE' === $parameter->name) {
                continue;
            }

            $parameters[] = $parameter;
        }

        $writer->startElement(strtolower($this->name));

        if (!empty($parameters)) {
            $writer->startElement('parameters');

            foreach ($parameters as $parameter) {
                $writer->startElement(strtolower($parameter->name));
                $writer->write($parameter);
                $writer->endElement();
            }

            $writer->endElement();
        }

        $this->xmlSerializeValue($writer);
        $writer->endElement();
    }
430767
function xmlSerialize(Writer $writer) {
        // TODO: Implement xmlSerialize() method.
        if($this->telephone !== null) {
            $writer->write([
                Schema::CBC . 'Telephone' => $this->telephone
            ]);
        }

        if($this->telefax !== null) {
            $writer->write([
                Schema::CBC . 'Telefax' => $this->telefax
            ]);
        }

        if($this->electronicMail !== null) {
            $writer->write([
                Schema::CBC . 'ElectronicMail' => $this->electronicMail
            ]);
        }
    }
40320
function let(Writer $writer, ConfiguratorInterface $configurator)
    {
        $this->beConstructedWith(
            $writer,
            $configurator,
            [Config::NAME_KEY => 'foo']
        );
    }
442038
function xmlSerialize(Writer $writer) {
        $this->validate();

        $writer->write([
            [
                'name' => Schema::CBC . 'TaxAmount',
                'value' => number_format($this->taxAmount, 2, '.', ''),
                'attributes' => [
                    'currencyID' => Generator::$currencyID
                ]
            ],
        ]);

        foreach($this->taxSubTotals as $taxSubTotal){
            $writer->write([Schema::CAC . 'TaxSubtotal' => $taxSubTotal]);
        }
    }
466749
public function write($message)
    {
        if (!$this->writer) {
            throw new \Parable\Log\Exception("Can't write without a valid \Log\Writer instance set.");
        }
        $message = $this->stringifyMessage($message);

        $this->writer->write($message);
        return $this;
    }
268535
function xmlSerialize(Writer $writer) {
        $this->validate();

        $writer->write([
                [
                    'name' => Schema::CBC . 'TaxableAmount',
                    'value' => number_format($this->taxableAmount, 2, '.', ''),
                    'attributes' => [
                        'currencyID' => Generator::$currencyID
                    ]

                ],
                [
                    'name' => Schema::CBC . 'TaxAmount',
                    'value' => number_format($this->taxAmount, 2, '.', ''),
                    'attributes' => [
                        'currencyID' => Generator::$currencyID
                    ]

                ],
                Schema::CAC.'TaxCategory' => $this->taxCategory
            ]
        );
    }
1154372
protected function write(string $string, int $writer = Output::STANDARD): void
	{
		$this->output->writeLn($string, $writer);
	}
841195
public function setWriter(\Parable\Log\Writer\WriterInterface $writer)
    {
        $this->writer = $writer;
        return $this;
    }