Tag
class Tag implements Reflector
Class Tag - Parses a tag definition for a DocBlock.
Constants
| REGEX_TAGNAME |
PCRE regular expression matching a tag name. |
Properties
| protected string | $tag | ||
| protected string|null | $content | ||
| protected string | $description | ||
| protected array|null | $parsedDescription | ||
| protected Location | $location | ||
| protected DocBlock | $docblock |
Methods
Factory method responsible for instantiating the correct sub type.
Registers a handler for tags.
Parses a tag and populates the member variables.
No description
Gets the name of this tag.
Gets the content of this tag.
Sets the content of this tag.
Gets the description component of this tag.
Sets the description component of this tag.
Gets the parsed text of this description.
Gets the docblock this tag belongs to.
Gets the location of the tag.
Builds a string representation of this object.
Returns the tag as a serialized string
Details
at line 103
final static Tag
createInstance(string $tagLine, DocBlock $docblock = null, Location $location = null)
Factory method responsible for instantiating the correct sub type.
at line 146
final static bool
registerTagHandler(string $tag, string|null $handler)
Registers a handler for tags.
Registers a handler for tags. The class specified is autoloaded if it's not available. It must inherit from this class.
at line 174
__construct(string $name, string $content, DocBlock $docblock = null, Location $location = null)
Parses a tag and populates the member variables.
at line 186
string
getTag()
at line 196
string
getName()
Gets the name of this tag.
at line 210
Tag
setName(string $name)
Sets the name of this tag.
at line 227
string
getContent()
Gets the content of this tag.
at line 243
Tag
setContent(string $content)
Sets the content of this tag.
at line 256
string
getDescription()
Gets the description component of this tag.
at line 268
Tag
setDescription(string $description)
Sets the description component of this tag.
at line 283
array
getParsedDescription()
Gets the parsed text of this description.
at line 298
DocBlock
getDocBlock()
Gets the docblock this tag belongs to.
at line 322
Location
getLocation()
Gets the location of the tag.
at line 352
static void
export()
Builds a string representation of this object.
at line 362
string
__toString()
Returns the tag as a serialized string