Lines Matching refs:this

83         $this->objectMetadataStack = new \SplStack();
84 $this->stack = new \SplStack();
85 $this->metadataStack = new \SplStack();
87 $this->currentNode = null;
88 $this->nullWasVisited = false;
90 $this->document = $this->createDocument($formatOutput, $defaultVersion, $defaultEncoding);
92 $this->defaultRootName = $defaultRootName;
93 $this->defaultRootNamespace = $defaultRootNamespace;
94 $this->defaultRootPrefix = $defaultRootPrefix;
110 … $rootNamespace = $metadata->xmlRootNamespace ?: $this->getClassDefaultNamespace($metadata);
112 $rootName = $rootName ?: $this->defaultRootName;
113 $rootNamespace = $rootNamespace ?: $this->defaultRootNamespace;
114 $rootPrefix = $rootPrefix ?: $this->defaultRootPrefix;
117 $document = $this->getDocument();
124 $this->setCurrentNode($rootNode);
133 $node = $this->document->createAttribute('xsi:nil');
135 $this->nullWasVisited = true;
144 $doCData = null !== $this->currentMetadata ? $this->currentMetadata->xmlElementCData : true;
146 …return $doCData ? $this->document->createCDATASection($data) : $this->document->createTextNode((st…
155 return $this->document->createTextNode((string) $data);
163 return $this->document->createTextNode($data ? 'true' : 'false');
171 return $this->document->createTextNode((string) $data);
179 return $this->document->createTextNode(var_export((float) $data, true));
187 if (null === $this->currentNode) {
188 $this->createRoot();
191 …$entryName = null !== $this->currentMetadata && null !== $this->currentMetadata->xmlEntryName ? $t…
192 …$keyAttributeName = null !== $this->currentMetadata && null !== $this->currentMetadata->xmlKeyAttr…
193 …$namespace = null !== $this->currentMetadata && null !== $this->currentMetadata->xmlEntryNamespace…
195 $elType = $this->getElementType($type);
197 …$tagName = null !== $this->currentMetadata && $this->currentMetadata->xmlKeyValuePairs && $this->i…
199 $entryNode = $this->createElement($tagName, $namespace);
200 $this->currentNode->appendChild($entryNode);
201 $this->setCurrentNode($entryNode);
208 if (null !== $node = $this->navigator->accept($v, $elType)) {
209 $this->currentNode->appendChild($node);
212 $this->currentNode->parentNode->removeChild($this->currentNode);
215 $this->revertCurrentNode();
224 $this->objectMetadataStack->push($metadata);
226 if (null === $this->currentNode) {
227 $this->createRoot($metadata);
230 $this->addNamespaceAttributes($metadata, $this->currentNode);
232 $this->hasValue = false;
241 $this->setCurrentMetadata($metadata);
242 $node = $this->navigator->accept($v, $metadata->type);
243 $this->revertCurrentMetadata();
249 …$this->setAttributeOnNode($this->currentNode, $metadata->serializedName, $node->nodeValue, $metada…
254 if (($metadata->xmlValue && $this->currentNode->childNodes->length > 0)
255 || (!$metadata->xmlValue && $this->hasValue)
261 $this->hasValue = true;
263 $this->setCurrentMetadata($metadata);
264 $node = $this->navigator->accept($v, $metadata->type);
265 $this->revertCurrentMetadata();
271 $this->currentNode->appendChild($node);
282 $this->setCurrentMetadata($metadata);
283 $node = $this->navigator->accept($value, null);
284 $this->revertCurrentMetadata();
290 … $this->setAttributeOnNode($this->currentNode, $key, $node->nodeValue, $metadata->xmlNamespace);
296 if ($addEnclosingElement = !$this->isInLineCollection($metadata) && !$metadata->inline) {
299 : $this->getClassDefaultNamespace($this->objectMetadataStack->top());
301 $element = $this->createElement($metadata->serializedName, $namespace);
302 $this->currentNode->appendChild($element);
303 $this->setCurrentNode($element);
306 $this->setCurrentMetadata($metadata);
309 if (null !== $node = $this->navigator->accept($v, $metadata->type)) {
310 $this->currentNode->appendChild($node);
313 $this->currentNode->parentNode->removeChild($this->currentNode);
314 $this->revertCurrentMetadata();
315 $this->revertCurrentNode();
316 $this->hasValue = false;
320 $this->revertCurrentMetadata();
323 $this->revertCurrentNode();
325 …if ($this->isElementEmpty($element) && (null === $v || $this->isSkippableCollection($metadata) || …
326 $this->currentNode->removeChild($element);
330 $this->hasValue = false;
355 $this->objectMetadataStack->pop();
363 if (null === $this->document->documentElement) {
365 $this->document->appendChild($node);
367 $this->createRoot();
369 $this->document->documentElement->appendChild($node);
374 if ($this->nullWasVisited) {
375 $this->document->documentElement->setAttributeNS(
381 return $this->document->saveXML();
386 return $this->currentNode;
391 return $this->currentMetadata;
396 if (null === $this->document) {
397 $this->document = $this->createDocument();
399 return $this->document;
404 $this->metadataStack->push($this->currentMetadata);
405 $this->currentMetadata = $metadata;
410 $this->stack->push($this->currentNode);
411 $this->currentNode = $node;
416 $this->setCurrentNode($node);
417 $this->document->appendChild($node);
422 return $this->currentNode = $this->stack->pop();
427 return $this->currentMetadata = $this->metadataStack->pop();
435 $this->nullWasVisited = false;