DocBlockGenerator
extends AbstractGenerator
in package
Table of Contents
Constants
- LINE_FEED = "\n"
- Line feed to use in place of EOL
Properties
- $indentation : string
- $isSourceDirty : bool
- $longDescription : string
- $shortDescription : string
- $sourceContent : string|null
- TODO: Type should be changed to "string" in the next major version. Nullable for BC
- $tagManager : TagManager|null
- $tags : array<string|int, mixed>
- $wordwrap : bool
Methods
- __construct() : mixed
- fromArray() : DocBlockGenerator
- Generate from array
- fromReflection() : DocBlockGenerator
- Build a DocBlock generator object from a reflection object
- generate() : string
- getIndentation() : string
- getLongDescription() : string
- getShortDescription() : string
- getSourceContent() : string|null
- getTags() : array<string|int, TagInterface>
- getWordWrap() : bool
- isSourceDirty() : bool
- setIndentation() : AbstractGenerator
- setLongDescription() : DocBlockGenerator
- setOptions() : AbstractGenerator
- setShortDescription() : DocBlockGenerator
- setSourceContent() : AbstractGenerator
- setSourceDirty() : AbstractGenerator
- setTag() : DocBlockGenerator
- setTags() : DocBlockGenerator
- setWordWrap() : DocBlockGenerator
- docCommentize() : string
- getTagManager() : TagManager
Constants
LINE_FEED
Line feed to use in place of EOL
public
mixed
LINE_FEED
= "\n"
Properties
$indentation
protected
string
$indentation
= ''
4 spaces by default
$isSourceDirty
protected
bool
$isSourceDirty
= true
$longDescription
protected
string
$longDescription
= ''
$shortDescription
protected
string
$shortDescription
= ''
$sourceContent
TODO: Type should be changed to "string" in the next major version. Nullable for BC
protected
string|null
$sourceContent
= null
$tagManager
protected
static TagManager|null
$tagManager
= null
$tags
protected
array<string|int, mixed>
$tags
= []
$wordwrap
protected
bool
$wordwrap
= true
Methods
__construct()
public
__construct([string|null $shortDescription = null ][, string|null $longDescription = null ][, array<string|int, array<string|int, mixed>>|array<string|int, TagInterface> $tags = [] ]) : mixed
Parameters
- $shortDescription : string|null = null
- $longDescription : string|null = null
- $tags : array<string|int, array<string|int, mixed>>|array<string|int, TagInterface> = []
fromArray()
Generate from array
public
static fromArray(array<string|int, mixed> $array) : DocBlockGenerator
Parameters
- $array : array<string|int, mixed>
Tags
Return values
DocBlockGeneratorfromReflection()
Build a DocBlock generator object from a reflection object
public
static fromReflection(DocBlockReflection $reflectionDocBlock) : DocBlockGenerator
Parameters
- $reflectionDocBlock : DocBlockReflection
Return values
DocBlockGeneratorgenerate()
public
generate() : string
Return values
stringgetIndentation()
public
getIndentation() : string
Return values
stringgetLongDescription()
public
getLongDescription() : string
Return values
stringgetShortDescription()
public
getShortDescription() : string
Return values
stringgetSourceContent()
public
getSourceContent() : string|null
Return values
string|nullgetTags()
public
getTags() : array<string|int, TagInterface>
Return values
array<string|int, TagInterface>getWordWrap()
public
getWordWrap() : bool
Return values
boolisSourceDirty()
public
isSourceDirty() : bool
Return values
boolsetIndentation()
public
setIndentation(string $indentation) : AbstractGenerator
Parameters
- $indentation : string
Return values
AbstractGeneratorsetLongDescription()
public
setLongDescription(string $longDescription) : DocBlockGenerator
Parameters
- $longDescription : string
Return values
DocBlockGeneratorsetOptions()
public
setOptions(array<string|int, mixed>|Traversable $options) : AbstractGenerator
Parameters
- $options : array<string|int, mixed>|Traversable
Tags
Return values
AbstractGeneratorsetShortDescription()
public
setShortDescription(string $shortDescription) : DocBlockGenerator
Parameters
- $shortDescription : string
Return values
DocBlockGeneratorsetSourceContent()
public
setSourceContent(string|null $sourceContent) : AbstractGenerator
Parameters
- $sourceContent : string|null
Return values
AbstractGeneratorsetSourceDirty()
public
setSourceDirty([bool $isSourceDirty = true ]) : AbstractGenerator
Parameters
- $isSourceDirty : bool = true
Return values
AbstractGeneratorsetTag()
public
setTag(array<string|int, mixed>|TagInterface $tag) : DocBlockGenerator
Parameters
- $tag : array<string|int, mixed>|TagInterface
Tags
Return values
DocBlockGeneratorsetTags()
public
setTags(array<string|int, array<string|int, mixed>>|array<string|int, TagInterface> $tags) : DocBlockGenerator
Parameters
- $tags : array<string|int, array<string|int, mixed>>|array<string|int, TagInterface>
Return values
DocBlockGeneratorsetWordWrap()
public
setWordWrap(bool $value) : DocBlockGenerator
Parameters
- $value : bool
Return values
DocBlockGeneratordocCommentize()
protected
docCommentize(string $content) : string
Parameters
- $content : string
Return values
stringgetTagManager()
protected
static getTagManager() : TagManager