PHP Class phpDocumentor\Reflection\DocBlock\Tag

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

Protected Properties

Свойство 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

Méthodes publiques

Méthode 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 méthode

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 méthode

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

createInstance() final public static méthode

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.
Résultat static A new tag object.

export() public static méthode

Builds a string representation of this object.
public static export ( ) : void
Résultat void

getContent() public méthode

Gets the content of this tag.
public getContent ( ) : string
Résultat string

getDescription() public méthode

Gets the description component of this tag.
public getDescription ( ) : string
Résultat string

getDocBlock() public méthode

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

getLocation() public méthode

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

getName() public méthode

Gets the name of this tag.
public getName ( ) : string
Résultat string The name of this tag.

getParsedDescription() public méthode

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

registerTagHandler() final public static méthode

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.
Résultat boolean TRUE on success, FALSE on failure.

setContent() public méthode

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

setDescription() public méthode

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

setDocBlock() public méthode

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 méthode

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 méthode

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