Generic
extends BaseTag
in package
implements
StaticMethod
Parses a tag definition for a DocBlock.
Interfaces, Classes and Traits
Table of Contents
- $description : Description|null
- $name : string
- __construct() : mixed
- Parses a tag and populates the member variables.
- __toString() : string
- Returns the tag as a serialized string
- create() : static
- Creates a new tag that represents any unknown tag type.
- getDescription() : Description|null
- getName() : string
- Gets the name of this tag.
- render() : string
- validateTagName() : void
- Validates if the tag name matches the expected format, otherwise throws an exception.
Properties
$description
protected
Description|null
$description
= null
Description of the tag.
$name
protected
string
$name
= ''
Name of the tag
Methods
__construct()
Parses a tag and populates the member variables.
public
__construct(string $name[, Description $description = null ]) : mixed
Parameters
- $name : string
-
Name of the tag.
- $description : Description = null
-
The contents of the given tag.
Return values
mixed —__toString()
Returns the tag as a serialized string
public
__toString() : string
Return values
string —create()
Creates a new tag that represents any unknown tag type.
public
static create(string $body[, string $name = '' ][, DescriptionFactory|null $descriptionFactory = null ][, Context|null $context = null ]) : static
Parameters
- $body : string
- $name : string = ''
- $descriptionFactory : DescriptionFactory|null = null
- $context : Context|null = null
Return values
static —getDescription()
public
getDescription() : Description|null
Return values
Description|null —getName()
Gets the name of this tag.
public
getName() : string
Return values
string —The name of this tag.
render()
public
render([Formatter|null $formatter = null ]) : string
Parameters
- $formatter : Formatter|null = null
Return values
string —validateTagName()
Validates if the tag name matches the expected format, otherwise throws an exception.
private
validateTagName(string $name) : void
Parameters
- $name : string