(non-PHPdoc).

@see \Ddeboer\DataImport\Writer\WriterInterface::writeItem()
184979
public function writeItem(array $item)
    {
        $newNode = $this->xml->createElement($this->rowNodeName);

        //attributes
        if (isset($item['@attributes']) && is_array($item['@attributes'])) {
            foreach ($item['@attributes'] as $key => $value) {
                $attr = $this->xml->createAttribute($key);
                $attr->value = $value;
                $newNode->appendChild($attr);
            }
            unset($item['@attributes']);
        }

        //values
        foreach ($item as $key => $value) {
            $node = $this->xml->createElement($key);
            $node->nodeValue = $value;
            $newNode->appendChild($node);
        }

        $this->rootNode->appendChild($newNode);

        return $this;
    }
1356202
public function addItem(CNabuDataObject $item)
    {
        $retval = false;

        if ($this->index_field !== false) {
            if ($item->contains($this->index_field)) {
                if (is_array($this->list)) {
                    $this->list[$item->getValue($this->index_field)] = $item;
                    $retval = $item;
                } else {
                    $this->list = array(
                        $item->getValue($this->index_field) => $item
                    );
                    $retval = $item;
                }
            }
        } else {
            if (is_array($this->list)) {
                $this->list[] = $item;
                $retval = $item;
            } else {
                $this->list = array($item);
                $retval = $item;
            }
        }

        $this->indexItem($item);

        return $retval;
    }
188701
public function addItem(Item $item)
    {
        $itemUUID = $item->composeUUID();

        $this->elementsToUpdate[$itemUUID] = $item;
        unset($this->elementsToDelete[$itemUUID]);
    }
634024
public function addItem(Item $oItem)
    {
        if (empty(!$this->iId)) {
            throw new InvoiceException('Invoice has been saved and cannot be modified.');
        }
        $this->aItems[] = $oItem;
        return $this;
    }
775244
public function write($data)
    {
        $this->ensureDeviceOpen();

        if (false !== ($dataWritten = fwrite($this->fd, $data))) {
            return $dataWritten;
        }

        throw new WriteNotAllowed();
    }
1030214
public function write(WriterInterface $writer)
    {
        foreach ($this->childs as $schema) {
            $schema->write($writer);
        }

        return $this;
    }
55030
public function write(Iterator $dataIterator)
    {
        $this->initialize();
        foreach ($dataIterator as $item) {
            $this->writeItem($item);
        }
        $this->finish();
    }
551233
function write(cb, item) {
				if (this.put(item)) {
						exports.setImmediate(function () {
							cb(err);
						});
					} else {
						pendingWrites.push([cb, item]);
					}
			}
1133409
public function update($changeItemContent = false)
    {
        $returnValue = array();
        $objects     = new RecursiveIteratorIterator(new RecursiveDirectoryIterator($this->itemPath), RecursiveIteratorIterator::SELF_FIRST);
        $i = 0;
        $fixed = 0;
        
        foreach ($objects as $itemFile => $cursor) {

            if (is_file($itemFile)) {
                
                $this->checkedFiles[$itemFile] = false;

                if (basename($itemFile) === 'qti.xml') {

                    $i++;
                    $xml = new \DOMDocument();
                    $xml->load($itemFile);

                    $parser = new ParserFactory($xml);
                    $item   = $parser->load();
                    \common_Logger::i('checking item #'.$i.' id:'.$item->attr('identifier').' file:'.$itemFile);

                    if ($this->updateItem($item, $itemFile)) {
                        $this->checkedFiles[$itemFile] = true;
                        $returnValue[$itemFile]        = $item;
                        \common_Logger::i('fixed required for #'.$i.' id:'.$item->attr('identifier').' file:'.$itemFile);
                        if ($changeItemContent) {
                            $fixed++;
                            \common_Logger::i('item fixed #'.$i.' id:'.$item->attr('identifier').' file:'.$itemFile);
                            file_put_contents($itemFile, $item->toXML());
                        }
                    }
                }
            }
        }

        \common_Logger::i('total item fixed : '.$fixed);
        return $returnValue;
    }
230770
private function _writeDefaultContentType(PHPWord_Shared_XMLWriter $objWriter = null, $pPartname = '', $pContentType = '') {
		if($pPartname != '' && $pContentType != '') {
			// Write content type
			$objWriter->startElement('Default');
			$objWriter->writeAttribute('Extension', 	$pPartname);
			$objWriter->writeAttribute('ContentType', 	$pContentType);
			$objWriter->endElement();
		} else {
			throw new Exception("Invalid parameters passed.");
		}
	}
1342586
public function createResourceItem(ArticleViewDocumentInterface $articleViewDocument)
    {
        return new ArticleResourceItem(
            $articleViewDocument,
            $this->getResource($articleViewDocument->getUuid(), $articleViewDocument->getLocale())
        );
    }
835518
public function addItem($item)
    {
        $indentation = $this->indent($this->indentation);

        $this->buffer[] = $indentation.$item;
    }
530605
public function putItem($name, $value = null)
    {
        if (is_null($name) || is_int($name)) {
            $this->_items[] = $value;
        } else {
            $this->_items[$name] = $value;
        }
    }
1061835
public function addItem(GridItem $gridItem)
    {
        if (!$this->items->contains($gridItem)) {
            $this->items->add($gridItem);
        }
    }
1294480
public function write($showDebug = false, $forceInsert = false, $forceWrite = false, $writeComponents = false)
    {
        throw new Exception("{$this->ClassName} can not be written back to the database.");
    }
108345
private function processAttributes($data, ApiItemInterface $item)
    {
        $result = true;
        try {
            if (isset($data['attributes']) && is_array($data['attributes'])) {
                /** @var ItemAttribute $itemAttribute */
                $get = function ($itemAttribute) {
                    return $itemAttribute->getId();
                };

                $delete = function ($itemAttribute) use ($item) {
                    // Delete item.
                    $this->em->remove($itemAttribute);
                };

                /** @var ItemAttribute $itemAttribute */
                $update = function ($itemAttribute, $matchedEntry) use ($item) {
                    $itemAttribute->setAttribute($matchedEntry['attribute']);
                    $itemAttribute->setValue($matchedEntry['value']);

                    return $itemAttribute ? true : false;
                };

                $add = function ($itemData) use ($item) {
                    $itemAttribute = new ItemAttribute();
                    $itemAttribute->setAttribute($itemData['attribute']);
                    $itemAttribute->setValue($itemData['value']);
                    $itemAttribute->setItem($item->getEntity());
                    $this->em->persist($itemAttribute);

                    return $item->addAttribute($itemAttribute);
                };

                $result = $this->processSubEntities(
                    $item->getAttributes(),
                    isset($data['attributes']) ? $data['attributes'] : [],
                    $get,
                    $add,
                    $update,
                    $delete
                );
            }
        } catch (\Exception $e) {
            throw new ItemException('Error while creating attributes: ' . $e->getMessage());
        }

        return $result;
    }
1027691
public function write($mData, string $sKey = null): Item
    {
        //  Generate a key if one isn't explicitly specified
        if (is_null($sKey)) {
            $sKey = md5(microtime(true));
        }

        $sPath = $this->prepKey($sKey);

        file_put_contents($sPath, $mData);

        return $this->newItem($sKey);
    }