Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. XmlEncoderContextBuilder.php

function XmlEncoderContextBuilder::withAsCollection

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

File

vendor/symfony/serializer/Context/Encoder/XmlEncoderContextBuilder.php, line 31

Class

XmlEncoderContextBuilder
A helper providing autocompletion for available XmlEncoder options.

Namespace

Symfony\Component\Serializer\Context\Encoder

Code

public function withAsCollection(?bool $asCollection) : static {
    return $this->with(XmlEncoder::AS_COLLECTION, $asCollection);
}
RSS feed
Powered by Drupal