You are here

public function Context::setNamespaceAlias in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Context.php \phpDocumentor\Reflection\DocBlock\Context::setNamespaceAlias()

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

$this

1 call to Context::setNamespaceAlias()
Context::setNamespaceAliases in vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Context.php
Sets the namespace aliases, replacing all previous ones.

File

vendor/phpdocumentor/reflection-docblock/src/phpDocumentor/Reflection/DocBlock/Context.php, line 132

Class

Context
The context in which a DocBlock occurs.

Namespace

phpDocumentor\Reflection\DocBlock

Code

public function setNamespaceAlias($alias, $fqnn) {
  $this->namespace_aliases[$alias] = '\\' . trim((string) $fqnn, '\\');
  return $this;
}