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

Breadcrumb

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

function Serializer::__construct

Same name in this branch
  1. 11.1.x vendor/symfony/serializer/Serializer.php \Symfony\Component\Serializer\Serializer::__construct()
  2. 11.1.x core/modules/jsonapi/src/Serializer/Serializer.php \Drupal\jsonapi\Serializer\Serializer::__construct()
  3. 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\DocBlock

Code

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;
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal