Documentation

Description
in package
implements Reflector

Parses a Description of a DocBlock or tag.

Tags
author

Mike van Riel mike.vanriel@naenius.com

license

http://www.opensource.org/licenses/mit-license.php MIT

link
http://phpdoc.org

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

$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
todo

determine the exact format as used by PHP Reflection and implement it.

codeCoverageIgnore

Not yet implemented

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
todo

this should become a more intelligent piece of code where the configuration contains a setting what format long descriptions are.

codeCoverageIgnore

Will be removed soon, in favor of adapters at PhpDocumentor itself that will process text in various formats.

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.

Return values
$this

Search results