function CsvEncoderContextBuilder::withEnclosure
Configures the field enclosure character.
Must be a single character.
Throws
File
-
vendor/
symfony/ serializer/ Context/ Encoder/ CsvEncoderContextBuilder.php, line 51
Class
- CsvEncoderContextBuilder
- A helper providing autocompletion for available CsvEncoder options.
Namespace
Symfony\Component\Serializer\Context\EncoderCode
public function withEnclosure(?string $enclosure) : static {
if (null !== $enclosure && 1 !== \strlen($enclosure)) {
throw new InvalidArgumentException(\sprintf('The "%s" enclosure must be a single character.', $enclosure));
}
return $this->with(CsvEncoder::ENCLOSURE_KEY, $enclosure);
}