Documentation

Context
in package

The context in which a DocBlock occurs.

Tags
author

Vasil Rangelov boen.robot@gmail.com

license

http://www.opensource.org/licenses/mit-license.php MIT

link
http://phpdoc.org

Table of Contents

$lsen  : string
$namespace  : string
$namespace_aliases  : array<string|int, mixed>
__construct()  : mixed
Cteates a new context.
getLSEN()  : string
Returns the Local Structural Element Name.
getNamespace()  : string
getNamespaceAliases()  : array<string|int, mixed>
setLSEN()  : $this
Sets a new Local Structural Element Name.
setNamespace()  : $this
Sets a new namespace.
setNamespaceAlias()  : $this
Adds a namespace alias to the context.
setNamespaceAliases()  : $this
Sets the namespace aliases, replacing all previous ones.

Properties

$lsen

protected string $lsen = ''

Name of the structural element, within the namespace.

$namespace

protected string $namespace = ''

The current namespace.

$namespace_aliases

protected array<string|int, mixed> $namespace_aliases = array()

List of namespace aliases => Fully Qualified Namespace.

Methods

__construct()

Cteates a new context.

public __construct([string $namespace = '' ][, array<string|int, mixed> $namespace_aliases = array() ][, string $lsen = '' ]) : mixed
Parameters
$namespace : string = ''

The namespace where this DocBlock resides in.

$namespace_aliases : array<string|int, mixed> = array()

List of namespace aliases => Fully Qualified Namespace.

$lsen : string = ''

Name of the structural element, within the namespace.

Return values
mixed

getLSEN()

Returns the Local Structural Element Name.

public getLSEN() : string
Return values
string

Name of the structural element, within the namespace.

getNamespace()

public getNamespace() : string
Return values
string

The namespace where this DocBlock resides in.

getNamespaceAliases()

public getNamespaceAliases() : array<string|int, mixed>
Return values
array<string|int, mixed>

List of namespace aliases => Fully Qualified Namespace.

setLSEN()

Sets a new Local Structural Element Name.

public setLSEN(string $lsen) : $this

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
$lsen : string

The new local name of a structural element.

Return values
$this

setNamespace()

Sets a new namespace.

public setNamespace(string $namespace) : $this

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
$namespace : string

The new namespace to set.

Return values
$this

setNamespaceAlias()

Adds a namespace alias to the context.

public setNamespaceAlias(string $alias, string $fqnn) : $this
Parameters
$alias : string

The alias name (the part after "as", or the last part of the Fully Qualified Namespace Name) to add.

$fqnn : string

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 values
$this

setNamespaceAliases()

Sets the namespace aliases, replacing all previous ones.

public setNamespaceAliases(array<string|int, mixed> $namespace_aliases) : $this
Parameters
$namespace_aliases : array<string|int, mixed>

List of namespace aliases => Fully Qualified Namespace.

Return values
$this

Search results