Tag

Superclass for any parsed PHPDoc.

class Tag

Implementors are meant to be immutable.

Copyright
2016 Appertly
License
Apache-2.0

Constructors / Destructors

Public
ReturnsSignature and Description
void
__construct(string $name)

Creates a new Tag.

Instance Methods

Public
ReturnsSignature and Description
string

Returns a string representation.

string

Gets the name of the tag

bool
isNeeded(ConstVector<Tag> $tags)

Whether this tag is needed in the vector.

Method Details

__construct

public function __construct(string $name)

Creates a new Tag.

Parameters
NameTypeDescription
$namestring

The type of tag

__toString

public function __toString()

Returns a string representation.

Returns
TypeDescription
string

The string representation

getName

public function getName()

Gets the name of the tag

Returns
TypeDescription
string

The name

isNeeded

public function isNeeded(ConstVector<Tag> $tags)

Whether this tag is needed in the vector.

Parameters
NameTypeDescription
$tagsConstVector<Tag>

The tags

Returns
TypeDescription
bool

true if the tag is not duplicated in the vector