class Context

Class Context - The context in which a DocBlock occurs.

Properties

protected string $namespace
protected array $namespaceAliases
protected string $lsen

Methods

__construct(string $namespace = '', array $namespaceAliases = array(), string $lsen = '')

Cteates a new context.

string
getNamespace()

No description

array
getNamespaceAliases()

No description

string
getLSEN()

Returns the Local Structural Element Name.

setNamespace(string $namespace)

Sets a new namespace.

setNamespaceAliases(array $namespaceAliases)

Sets the namespace aliases, replacing all previous ones.

setNamespaceAlias(string $alias, string $fqnn)

Adds a namespace alias to the context.

setLSEN(string $lsen)

Sets a new Local Structural Element Name.

Details

at line 32
__construct(string $namespace = '', array $namespaceAliases = array(), string $lsen = '')

Cteates a new context.

Parameters

string $namespace The namespace where this DocBlock resides in.
array $namespaceAliases List of namespace aliases => Fully Qualified Namespace.
string $lsen Name of the structural element, within the namespace.

at line 43
string getNamespace()

Return Value

string The namespace where this DocBlock resides in.

at line 51
array getNamespaceAliases()

Return Value

array List of namespace aliases => Fully Qualified Namespace.

at line 61
string getLSEN()

Returns the Local Structural Element Name.

Return Value

string Name of the structural element, within the namespace.

at line 77
Context setNamespace(string $namespace)

Sets a new namespace.

Sets a new namespace for the context. Leading and trailing slashes are trimmed, and the keywords "global" and "default" are treated as aliases to no namespace.

Parameters

string $namespace The new namespace to set.

Return Value

Context

at line 98
Context setNamespaceAliases(array $namespaceAliases)

Sets the namespace aliases, replacing all previous ones.

Parameters

array $namespaceAliases List of namespace aliases => Fully Qualified Namespace.

Return Value

Context

at line 116
Context setNamespaceAlias(string $alias, string $fqnn)

Adds a namespace alias to the context.

Parameters

string $alias The alias name (the part after "as", or the last part of the Fully Qualified Namespace Name) to add.
string $fqnn The Fully Qualified Namespace Name for this alias. Any form of leading/trailing slashes are accepted, but what will be stored is a name, prefixed with a slash, and no trailing slash.

Return Value

Context

at line 134
Context setLSEN(string $lsen)

Sets a new Local Structural Element Name.

Sets a new Local Structural Element Name. A local name also contains punctuation determining the kind of structural element (e.g. trailing "(" and ")" for functions and methods).

Parameters

string $lsen The new local name of a structural element.

Return Value

Context