class Description

Parses a Description of a DocBlock or tag.

Properties

protected string $contents
protected array $parsedContents
protected DocBlock $docblock

Methods

__construct(string $content, DocBlock $docblock = null)

Populates the fields of a description.

string
getContents()

Gets the text of this description.

setContent(string $content)

Sets the text of this description.

array
getParsedContents()

Returns the parsed text of this description.

string
getFormattedContents()

Return a formatted variant of the Long Description using MarkDown.

getDocBlock()

Gets the docblock this tag belongs to.

setDocBlock(DocBlock $docblock = null)

Sets the docblock this tag belongs to.

static void
export()

Builds a string representation of this object.

string
__toString()

Returns the long description as a string.

Details

at line 34
__construct(string $content, DocBlock $docblock = null)

Populates the fields of a description.

Parameters

string $content The description's conetnts.
DocBlock $docblock The DocBlock which this description belongs to.

at line 44
string getContents()

Gets the text of this description.

Return Value

string

at line 56
Description setContent(string $content)

Sets the text of this description.

Parameters

string $content The new text of this description.

Return Value

Description

at line 69
array getParsedContents()

Returns the parsed text of this description.

Return Value

array An array of strings and tag objects, in the order they occur within the description.

at line 139
string getFormattedContents()

Return a formatted variant of the Long Description using MarkDown.

Return Value

string

at line 167
DocBlock getDocBlock()

Gets the docblock this tag belongs to.

Return Value

DocBlock The docblock this description belongs to.

at line 178
Description setDocBlock(DocBlock $docblock = null)

Sets the docblock this tag belongs to.

Parameters

DocBlock $docblock The new docblock this description belongs to. Setting NULL removes any association.

Return Value

Description

at line 197
static void export()

Builds a string representation of this object.

Return Value

void

Exceptions

Exception

at line 206
string __toString()

Returns the long description as a string.

Return Value

string