Copied!

A helper providing autocompletion for available XmlEncoder options.

CloneableFinalInstantiable
Methods
public toArray() : array
 
  • return array<string,mixed>
public withAsCollection(?bool $asCollection) : static
 

Configures whether the decoded result should be considered as a collection
or as a single element.

public withContext(Symfony\Component\Serializer\Context\ContextBuilderInterface|array $context) : static
 
  • param \ContextBuilderInterface|array<string,mixed> $context
public withDecoderIgnoredNodeTypes(?array $decoderIgnoredNodeTypes) : static
 

Configures node types to ignore while decoding.

  • see https://www.php.net/manual/en/dom.constants.php
  • param list<int>|null $decoderIgnoredNodeTypes
public withEncoderIgnoredNodeTypes(?array $encoderIgnoredNodeTypes) : static
 

Configures node types to ignore while encoding.

  • see https://www.php.net/manual/en/dom.constants.php
  • param list<int>|null $encoderIgnoredNodeTypes
public withEncoding(?string $encoding) : static
 

Configures the DOMDocument encoding.

  • see https://www.php.net/manual/en/class.domdocument.php#domdocument.props.encoding
public withFormatOutput(?bool $formatOutput) : static
 

Configures whether to encode with indentation and extra space.

  • see https://php.net/manual/en/class.domdocument.php#domdocument.props.formatoutput
public withLoadOptions(?int $loadOptions) : static
 

Configures the DOMDocument::loadXml options bitmask.

  • see https://www.php.net/manual/en/libxml.constants.php
  • param positive-int|null $loadOptions
public withRemoveEmptyTags(?bool $removeEmptyTags) : static
 

Configures whether to keep empty nodes.

public withRootNodeName(?string $rootNodeName) : static
 

Configures name of the root node.

public withSaveOptions(?int $saveOptions) : static
 

Configures the DOMDocument::saveXml options bitmask.

  • see https://www.php.net/manual/en/libxml.constants.php
  • param positive-int|null $saveOptions
public withStandalone(?bool $standalone) : static
 

Configures whether the document will be standalone.

  • see https://php.net/manual/en/class.domdocument.php#domdocument.props.xmlstandalone
public withTypeCastAttributes(?bool $typeCastAttributes) : static
 

Configures whether casting numeric string attributes to integers or floats.

public withVersion(?string $version) : static
 

Configures the version number of the document.

  • see https://php.net/manual/en/class.domdocument.php#domdocument.props.xmlversion
Methods
protected with(string $key, ?mixed $value) : static
Properties
private array $context = []
 
  • var array<string,mixed>
© 2023 Bruce Wells
Search Namespaces \ Classes
Configuration