Generic Definition which adds the basic tag information to the structure file.

category phpDocumentor
package Parser
subpackage Tag_Definitions
author Mike van Riel
license MIT
link http://phpdoc.org

 Methods

Initializes this object with the given data and sets the name and description.

__construct(string $namespace, string[] $namespace_aliases, \DOMElement $xml, \phpDocumentor\Reflection\DocBlock\Tag $tag) 

Parameters

$namespace

string

Namespace where this tag occurs.

$namespace_aliases

string[]

Aliases used for all namespaces at the location of this tag.

$xml

\DOMElement

XML to enhance.

$tag

\phpDocumentor\Reflection\DocBlock\Tag

Tag object to use.

Creates a new instance of this class or one of the specialized sub-classes.

create(string $namespace, string[] $namespace_aliases, \DOMElement $xml, \phpDocumentor\Reflection\DocBlock\Tag $tag) : \phpDocumentor\Plugin\Core\Parser\DocBlock\Tag\Definition\Definition
Static
todo replace the switch statement with an intelligent container / plugin system.

Parameters

$namespace

string

Namespace where this tag occurs.

$namespace_aliases

string[]

Aliases used for all namespaces at the location of this tag.

$xml

\DOMElement

Root xml element for this tag.

$tag

\phpDocumentor\Reflection\DocBlock\Tag

The actual tag as reflected.

Returns

Dispatches a logging request to log a debug message.

debug(string $message) : void
Inherited
inherited_from \phpDocumentor\Parser\ParserAbstract::debug()

Parameters

$message

string

The message to log.

Returns the namespace identifier for this tag.

getNamespace() : string

Returns

string

Returns all aliases for namespaces at the location of this tag.

getNamespaceAliases() : array

Returns

array

Dispatches a logging request.

log(string $message, int $priority) : void
Inherited
inherited_from \phpDocumentor\Parser\ParserAbstract::log()

Parameters

$message

string

The message to log.

$priority

int

The logging priority, the lower,the more important. Ranges from 1 to 7

Setter for the description so it can be overridden.

setDescription(string $description) : void

Parameters

$description

string

Description for this definition.

Setter for the name so it can be overridden.

setName(string $name) : void

Parameters

$name

string

Name for this definition.

Sets the namespace for this tag; is used to determine type info.

setNamespace(string $namespace) : void

Parameters

$namespace

string

Namespace name for this definition.

Sets the aliases for all namespaces.

setNamespaceAliases(string[] $namespace_aliases) : void

Parameters

$namespace_aliases

string[]

Array of aliases.

Setter for the reference so it can be overridden.

setReference(string $name) : void

Parameters

$name

string

Name of the element to which is referred.

Adds type information to the structure.

setTypes(string[] $types) : void
todo Move this method to a better spot with namespace and alias access (together with namespace and alias stuff).

Parameters

$types

string[]

Array with types in any format; will be transformed to FQCN.

Hook method where children can extend the structure with extra information.

configure() : void

Tries to expand a type to it's full namespaced equivalent.

expandType(string $type, bool $ignore_non_objects) : string

Parameters

$type

string

Type to expand into full namespaced equivalent.

$ignore_non_objects

bool

whether to ignore reserved words, when false it will not expand a set of keywords.

Returns

string

 Properties

 

$namespace : string
 

$namespace_aliases : array
 

$tag : \phpDocumentor\Reflection\DocBlock\Tag
 

$xml : \DOMEelement