BlueSpice MediaWiki master
 All Classes Namespaces Files Functions Variables Groups Pages
phpDocumentor\Reflection\Types\ContextFactory Class Reference
Collaboration diagram for phpDocumentor\Reflection\Types\ContextFactory:

Public Member Functions

 createFromReflector (\Reflector $reflector)
 createForNamespace ($namespace, $fileContents)

Public Attributes

const T_LITERAL_END_OF_USE = ';'

Detailed Description

Convenience class to create a Context for DocBlocks when not using the Reflection Component of phpDocumentor.

For a DocBlock to be able to resolve types that use partial namespace names or rely on namespace imports we need to provide a bit of context so that the DocBlock can read that and based on it decide how to resolve the types to Fully Qualified names.

See Also
Context for more information.

Member Function Documentation

phpDocumentor\Reflection\Types\ContextFactory::createForNamespace (   $namespace,

Build a Context for a namespace in the provided file contents.

string$namespaceIt does not matter if a \ precedes the namespace name, this method first normalizes.
string$fileContentsthe file's contents to retrieve the aliases from with the given namespace.
See Also
Context for more information on Contexts.
phpDocumentor\Reflection\Types\ContextFactory::createFromReflector ( \Reflector  $reflector)

Build a Context given a Class Reflection.

See Also
Context for more information on Contexts.

Member Data Documentation

const phpDocumentor\Reflection\Types\ContextFactory::T_LITERAL_END_OF_USE = ';'

The literal used at the end of a use statement.

const phpDocumentor\Reflection\Types\ContextFactory::T_LITERAL_USE_SEPARATOR = ','

The literal used between sets of use statements

The documentation for this class was generated from the following file: