Block

A parsed PHPDoc.

class Block implements Stringish
Copyright
2016 Appertly
License
Apache-2.0

Constructors / Destructors

Public
ReturnsSignature and Description
void
__construct(string $summary, string $description, Traversable<Tag> $tags)

Creates a new Block.

Instance Methods

Public
ReturnsSignature and Description
string

Gets the string representation.

string

Gets the doc block description.

string

Gets the doc block summary

ImmVector<Tag>

Gets the doc block tags.

Block
inherit(?Block $block)

Combines this block with a parent block

Method Details

__construct

public function __construct(string $summary, string $description, Traversable<Tag> $tags)

Creates a new Block.

Parameters
NameTypeDescription
$summarystring

The summary

$descriptionstring

The description

$tagsTraversable<Tag>

The tags

__toString

public function __toString()

Gets the string representation.

Returns
TypeDescription
string

The string representation

getDescription

public function getDescription()

Gets the doc block description.

Returns
TypeDescription
string

The description

getSummary

public function getSummary()

Gets the doc block summary

Returns
TypeDescription
string

The summary

getTags

public function getTags()

Gets the doc block tags.

Returns
TypeDescription
ImmVector<Tag>

The tags

inherit

public function inherit(?Block $block)

Combines this block with a parent block

Parameters
NameTypeDescription
$block?Block

The parent block, or null

Returns
TypeDescription
Block

The new combined block