Serializer
class Serializer
Class Serializer - Serializes a DocBlock instance.
Properties
| protected string | $indentString | ||
| protected int | $indent | ||
| protected bool | $isFirstLineIndented | ||
| protected int|null | $lineLength |
Methods
Create a Serializer instance.
Sets the string to indent comments with.
Gets the string to indent comments with.
Sets the number of indents.
Gets the number of indents.
Sets whether or not the first line should be indented.
Gets whether or not the first line should be indented.
Sets the line length.
Gets the line length.
Details
at line 38
__construct(int $indent = 0, string $indentString = ' ', bool $indentFirstLine = true, int|null $lineLength = null)
Create a Serializer instance.
at line 53
Serializer
setIndentationString(string $indentString)
Sets the string to indent comments with.
at line 65
string
getIndentationString()
Gets the string to indent comments with.
at line 77
Serializer
setIndent(int $indent)
Sets the number of indents.
at line 89
int
getIndent()
Gets the number of indents.
at line 103
Serializer
setIsFirstLineIndented(bool $indentFirstLine)
Sets whether or not the first line should be indented.
Sets whether or not the first line (the one with the "/**") should be indented.
at line 115
bool
isFirstLineIndented()
Gets whether or not the first line should be indented.
at line 129
Serializer
setLineLength(int|null $lineLength)
Sets the line length.
Sets the length of each line in the serialization. Content will be wrapped within this limit.
at line 141
int|null
getLineLength()
Gets the line length.
at line 153
string
getDocComment(DocBlock $docblock)
Generate a DocBlock comment.