Description
in package
implements
Reflector
Parses a Description of a DocBlock or tag.
Tags
Interfaces, Classes and Traits
- Reflector
Table of Contents
- $contents : string
- $docblock : DocBlock
- $parsedContents : array<string|int, mixed>
- __construct() : mixed
- Populates the fields of a description.
- __toString() : string
- Returns the long description as a string.
- export() : void
- Builds a string representation of this object.
- getContents() : string
- Gets the text of this description.
- getDocBlock() : DocBlock
- Gets the docblock this tag belongs to.
- getFormattedContents() : string
- Return a formatted variant of the Long Description using MarkDown.
- getParsedContents() : array<string|int, mixed>
- Returns the parsed text of this description.
- setContent() : $this
- Sets the text of this description.
- setDocBlock() : $this
- Sets the docblock this tag belongs to.
Properties
$contents
protected
string
$contents
= ''
$docblock
protected
DocBlock
$docblock
= null
The DocBlock which this description belongs to.
$parsedContents
protected
array<string|int, mixed>
$parsedContents
= null
The contents, as an array of strings and Tag objects.
Methods
__construct()
Populates the fields of a description.
public
__construct(string $content[, DocBlock $docblock = null ]) : mixed
Parameters
- $content : string
-
The description's conetnts.
- $docblock : DocBlock = null
-
The DocBlock which this description belongs to.
Return values
mixed —__toString()
Returns the long description as a string.
public
__toString() : string
Return values
string —export()
Builds a string representation of this object.
public
static export() : void
Tags
Return values
void —getContents()
Gets the text of this description.
public
getContents() : string
Return values
string —getDocBlock()
Gets the docblock this tag belongs to.
public
getDocBlock() : DocBlock
Return values
DocBlock —The docblock this description belongs to.
getFormattedContents()
Return a formatted variant of the Long Description using MarkDown.
public
getFormattedContents() : string
Tags
Return values
string —getParsedContents()
Returns the parsed text of this description.
public
getParsedContents() : array<string|int, mixed>
Return values
array<string|int, mixed> —An array of strings and tag objects, in the order they occur within the description.
setContent()
Sets the text of this description.
public
setContent(string $content) : $this
Parameters
- $content : string
-
The new text of this description.
Return values
$this —setDocBlock()
Sets the docblock this tag belongs to.
public
setDocBlock([DocBlock $docblock = null ]) : $this
Parameters
- $docblock : DocBlock = null
-
The new docblock this description belongs to. Setting NULL removes any association.