(non-PHPdoc).

@see \Mathielen\ImportEngine\Source\StorageInterface::writer()
772942
public function writer()
    {
        $writer = new ObjectWriter($this->objectFactory);

        $storage = $this;
        $writer->setObjectHandler(function ($object) use ($storage) {
            $storage->attach($object);
        });

        return $writer;
    }
1305606
public function getWriter() : WriterInterface
    {
        if ($this->writer === null) {
            $directory = $this->getDataDirectory();

            if (!$this->isDirectoryWritable($directory)) {
                throw new ParserConfigurationException("Directory '$directory' is not writable.", 1458974129);
            }

            $this->writer = new Writer($directory, $this->getSource());
            $this->writer->setPropertyFilter($this->getPropertyFilter());
            $this->writer->setDataVersionHash($this->getDataVersionHash());
        }

        return $this->writer;
    }
399981
public function handle(Writer $writer)
    {
        $writer->open($this->export);

        $sheetExports = [$this->export];
        if ($this->export instanceof WithMultipleSheets) {
            $sheetExports = $this->export->sheets();
        }

        // Pre-create the worksheets
        foreach ($sheetExports as $sheetIndex => $sheetExport) {
            $sheet = $writer->addNewSheet($sheetIndex);
            $sheet->open($sheetExport);
        }

        // Write to temp file with empty sheets.
        $writer->write($sheetExport, $this->temporaryFile, $this->writerType);
    }
476670
public function create($storage = null)
    {
        $storage = $storage ?: $this->getStorageDisk();

        return new FileHandler(
            $this->makeStorage($storage),
            $this->makeProcessor()
        );
    }
836041
public function write($data) {

		if(null === $this -> directory) {
			return trigger_error(sprintf('Directory used in %s() can not be empty', __METHOD__), E_USER_ERROR);
		}

		if(false === is_string($data)) {
			return trigger_error(sprintf('Argument 1 passed to %s() must be of the type string, "%s" given', __METHOD__, gettype($data)), E_USER_ERROR);
		}

		$file = $this -> generateFileName();
		$file = new File($file);

		//Create file if not exists
		if(false === $file -> exists()) {
			$file -> create();
		}

		//Append data to file
		$file -> append($data . "\n");

		return $this;
	}
923358
protected function _initWriter()
    {
        $this->_writer = new Mage_Archive_Helper_File($this->_destinationFilePath);
        $this->_writer->open('w');

        return $this;
    }
745477
public static function addWriter(Log_Interface $writer)
  {
    if (is_null(self::$_writers)) {
      self::$_writers = array();
    }
    
    $key = get_class($writer);
    if (!isset(self::$_writers[$key])) {
      self::$_writers[$key] = $writer;
      $result = true;
    } else {
      $result = false;
    }
    
    return $result;
  }
797640
public function writer()
    {
        if (empty($this->entityName)) {
            throw new InvalidConfigurationException('Can only use doctrine for writing if entityName is given.');
        }

        $writer = new DoctrineWriter($this->entityManager, $this->entityName);
        $writer->setTruncate(false);

        return $writer;
    }
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]);
        }
    }
932017
public function setStreamWriter($key, AbstractStreamWriter $writer)
    {
        $writer->setStream($this->getStream());
        $writer->setCloseStreamOnFinish(false);
        $this->writers[$key] = $writer;

        return $this;
    }
98232
public function export(FormatterInterface $formatter, $filename, $outDir, $storage = 'file')
    {
        if (!is_readable($filename)) {
            throw new \InvalidArgumentException(sprintf('Document not found "%s".', $filename));
        }
        if ($formatter && $storage = $this->getStorage($storage)) {
            if ($formatter->getRegistry()->config->get(FormatterInterface::CFG_USE_LOGGED_STORAGE)) {
                $storage = new LoggedStorage($storage);
            }
            $storage->setName(basename($filename, '.mwb'));
            $storage->setOutdir(realpath($outDir) ? realpath($outDir) : $outDir);
            $storage->setBackup($formatter->getRegistry()->config->get(FormatterInterface::CFG_BACKUP_FILE));
            $writer = $this->getWriter($formatter->getPreferredWriter());
            $writer->setStorage($storage);
            if ($eol = strtolower(trim($formatter->getRegistry()->config->get(FormatterInterface::CFG_EOL)))) {
                switch ($eol) {
                    case FormatterInterface::EOL_WIN:
                        $writer->getBuffer()->setEol("\r\n");
                        break;

                    case FormatterInterface::EOL_UNIX:
                        $writer->getBuffer()->setEol("\n");
                        break;
                }
            }
            $document = new Document($formatter);
            if (strlen($logFile = $formatter->getRegistry()->config->get(FormatterInterface::CFG_LOG_FILE))) {
                $logger = new LoggerFile(array('filename' => $logFile));
            } elseif ($formatter->getRegistry()->config->get(FormatterInterface::CFG_LOG_TO_CONSOLE)) {
                $logger = new LoggerConsole();
            } else {
                $logger = new Logger();
            }
            $document->setLogger($logger);
            $document->load($filename);
            $document->write($writer);
            if ($e = $document->getError()) {
                throw $e;
            }

            return $document;
        }
    }
1124790
public function xmlSerialize(Xml\Writer $writer)
    {
        foreach (explode(',', $this->value) as $value) {
            $writer->writeElement('text', $value);
        }
    }
692098
public function importStreamWriter(XmlStreamWriter $writer): XmlStreamWriter
    {
        return $this->append(
                function(\DOMNode $parent) use ($writer)
                {
                    $parent->appendChild($this->doc->importNode(
                            $writer->asDom()->documentElement,
                            true
                    ));
                },
                'imported nodes'
        );
    }
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();
    }
841195
public function setWriter(\Parable\Log\Writer\WriterInterface $writer)
    {
        $this->writer = $writer;
        return $this;
    }
747437
protected function openWriter()
    {
        if ($this->shouldAddBOM) {
            // Adds UTF-8 BOM for Unicode compatibility
            $this->globalFunctionsHelper->fputs($this->filePointer, EncodingHelper::BOM_UTF8);
        }
    }
1212937
public static function getWriters()
  {
    if (is_null(self::$_writers)) {
      $writers = Config::getInstance("JooS_Log")->writers;
      /* @var $writers JooS_Config */
      if (!is_null($writers)) {
        foreach ($writers->valueOf() as $name) {
          $name = ucfirst(strtolower($name));
          $className = Loader::getClassName(__NAMESPACE__ . "\\", $name);
          if (Loader::loadClass($className)) {
            $writer = new $className();
            if ($writer instanceof Log_Interface) {
              self::addWriter($writer);
            }
          }
        }
      } else {
        self::$_writers = array();
      }
    }
    return self::$_writers;
  }