function Serializer::__construct
Same name in this branch
- 11.1.x vendor/symfony/serializer/Serializer.php \Symfony\Component\Serializer\Serializer::__construct()
- 11.1.x core/modules/jsonapi/src/Serializer/Serializer.php \Drupal\jsonapi\Serializer\Serializer::__construct()
- 11.1.x core/modules/rest/src/Plugin/views/style/Serializer.php \Drupal\rest\Plugin\views\style\Serializer::__construct()
Create a Serializer instance.
Parameters
int $indent The number of times the indent string is repeated.:
string $indentString The string to indent the comment with.:
bool $indentFirstLine Whether to indent the first line.:
int|null $lineLength The max length of a line or NULL to disable line wrapping.:
Formatter $tagFormatter A custom tag formatter, defaults to PassthroughFormatter.:
string $lineEnding Line ending used in the output, by default \n is used.:
File
-
vendor/
phpdocumentor/ reflection-docblock/ src/ DocBlock/ Serializer.php, line 57
Class
- Serializer
- Converts a DocBlock back from an object to a complete DocComment including Asterisks.
Namespace
phpDocumentor\Reflection\DocBlockCode
public function __construct(int $indent = 0, string $indentString = ' ', bool $indentFirstLine = true, ?int $lineLength = null, ?Formatter $tagFormatter = null, string $lineEnding = "\n") {
$this->indent = $indent;
$this->indentString = $indentString;
$this->isFirstLineIndented = $indentFirstLine;
$this->lineLength = $lineLength;
$this->tagFormatter = $tagFormatter ?: new PassthroughFormatter();
$this->lineEnding = $lineEnding;
}