PHP Class phpDocumentor\Reflection\DocBlock\Tag

Author: Mike van Riel ([email protected])
Inheritance: implements Reflector
Mostra file Open project: explodybits/hookr-plugin Class Usage Examples

Protected Properties

Property Type Description
$content Content of the tag. When set to NULL, it means it needs to be regenerated.
$description Description of the content of this tag
$docblock The DocBlock which this tag belongs to.
$location Location of the tag.
$parsedDescription The description, as an array of strings and Tag objects. When set to NULL, it means it needs to be regenerated.
$tag Name of the tag

Public Methods

Method Description
__construct ( string $name, string $content, DocBlock $docblock = null, phpDocumentor\Reflection\DocBlock\Location $location = null ) Parses a tag and populates the member variables.
__toString ( ) : string Returns the exported information (we should use the export static method BUT this throws an exception at this point).
createInstance ( string $tag_line, DocBlock $docblock = null, phpDocumentor\Reflection\DocBlock\Location $location = null ) : static Factory method responsible for instantiating the correct sub type.
export ( ) : void Builds a string representation of this object.
getContent ( ) : string Gets the content of this tag.
getDescription ( ) : string Gets the description component of this tag.
getDocBlock ( ) : DocBlock Gets the docblock this tag belongs to.
getLocation ( ) : phpDocumentor\Reflection\DocBlock\Location Gets the location of the tag.
getName ( ) : string Gets the name of this tag.
getParsedDescription ( ) : array Gets the parsed text of this description.
registerTagHandler ( string $tag, string | null $handler ) : boolean Registers a handler for tags.
setContent ( string $content ) Sets the content of this tag.
setDescription ( string $description ) Sets the description component of this tag.
setDocBlock ( DocBlock $docblock = null ) Sets the docblock this tag belongs to.
setLocation ( phpDocumentor\Reflection\DocBlock\Location $location = null ) Sets the location of the tag.
setName ( string $name ) Sets the name of this tag.

Method Details

__construct() public method

Parses a tag and populates the member variables.
public __construct ( string $name, string $content, DocBlock $docblock = null, phpDocumentor\Reflection\DocBlock\Location $location = null )
$name string Name of the tag.
$content string The contents of the given tag.
$docblock phpDocumentor\Reflection\DocBlock The DocBlock which this tag belongs to.
$location phpDocumentor\Reflection\DocBlock\Location Location of the tag.

__toString() public method

Returns the exported information (we should use the export static method BUT this throws an exception at this point).
public __toString ( ) : string
return string

createInstance() final public static method

Factory method responsible for instantiating the correct sub type.
final public static createInstance ( string $tag_line, DocBlock $docblock = null, phpDocumentor\Reflection\DocBlock\Location $location = null ) : static
$tag_line string The text for this tag, including description.
$docblock phpDocumentor\Reflection\DocBlock The DocBlock which this tag belongs to.
$location phpDocumentor\Reflection\DocBlock\Location Location of the tag.
return static A new tag object.

export() public static method

Builds a string representation of this object.
public static export ( ) : void
return void

getContent() public method

Gets the content of this tag.
public getContent ( ) : string
return string

getDescription() public method

Gets the description component of this tag.
public getDescription ( ) : string
return string

getDocBlock() public method

Gets the docblock this tag belongs to.
public getDocBlock ( ) : DocBlock
return phpDocumentor\Reflection\DocBlock The docblock this tag belongs to.

getLocation() public method

Gets the location of the tag.
public getLocation ( ) : phpDocumentor\Reflection\DocBlock\Location
return phpDocumentor\Reflection\DocBlock\Location The tag's location.

getName() public method

Gets the name of this tag.
public getName ( ) : string
return string The name of this tag.

getParsedDescription() public method

Gets the parsed text of this description.
public getParsedDescription ( ) : array
return array An array of strings and tag objects, in the order they occur within the description.

registerTagHandler() final public static method

Registers a handler for tags. The class specified is autoloaded if it's not available. It must inherit from this class.
final public static registerTagHandler ( string $tag, string | null $handler ) : boolean
$tag string Name of tag to regiser a handler for. When registering a namespaced tag, the full name, along with a prefixing slash MUST be provided.
$handler string | null FQCN of handler. Specifing NULL removes the handler for the specified tag, if any.
return boolean TRUE on success, FALSE on failure.

setContent() public method

Sets the content of this tag.
public setContent ( string $content )
$content string The new content of this tag.

setDescription() public method

Sets the description component of this tag.
public setDescription ( string $description )
$description string The new description component of this tag.

setDocBlock() public method

Sets the docblock this tag belongs to.
public setDocBlock ( DocBlock $docblock = null )
$docblock phpDocumentor\Reflection\DocBlock The new docblock this tag belongs to. Setting NULL removes any association.

setLocation() public method

Sets the location of the tag.
public setLocation ( phpDocumentor\Reflection\DocBlock\Location $location = null )
$location phpDocumentor\Reflection\DocBlock\Location The new location of the tag.

setName() public method

Sets the name of this tag.
public setName ( string $name )
$name string The new name of this tag.

Property Details

$content protected_oe property

Content of the tag. When set to NULL, it means it needs to be regenerated.
protected $content

$description protected_oe property

Description of the content of this tag
protected $description

$docblock protected_oe property

The DocBlock which this tag belongs to.
protected $docblock

$location protected_oe property

Location of the tag.
protected $location

$parsedDescription protected_oe property

The description, as an array of strings and Tag objects. When set to NULL, it means it needs to be regenerated.
protected $parsedDescription

$tag protected_oe property

Name of the tag
protected $tag