Mapper
Takes the ScannedBase tokens and resolves PHPDoc inheritance.
Constructors / Destructors
| Returns | Signature and Description |
|---|---|
void | __construct(, )Creates a new Mapper. |
Instance Methods
| Returns | Signature and Description |
|---|---|
?ClassyDeclaration | getClass()Gets a class declaration |
ConstMap<string,ClassyDeclaration> | Gets all class declarations. |
?ConstantDeclaration | getConstant()Gets a constant declaration. |
?FileDeclaration | getFile()Gets a file definition. |
ConstMap<string,FileDeclaration> | getFiles()Gets the file definitions. |
?FunctionDeclaration | getFunction()Gets a function declaration. |
ConstSet<string> | Gets the namespaces of the tokens. |
ConstVector<ScannedBase> | Gets a list of all tokens |
ImmMap<string,ImmVector<ScannedBase>> | Gets all tokens by filename. |
ImmMap<string,ScannedBase> | Gets all tokens by their name. |
ImmMap<string,ImmVector<ScannedBase>> | Gets all tokens by namespace name. |
Method Details
__construct
__construct(ConstVector<ScannedBase> $tokens, Parser $parser)Creates a new Mapper.
| Name | Type | Description |
|---|---|---|
$tokens | ConstVector<ScannedBase> | All scanned tokens |
$parser | Parser |
getClass
getClass(string $name)Gets a class declaration
| Name | Type | Description |
|---|---|---|
$name | string | The class name |
| Type | Description |
|---|---|
?ClassyDeclaration | The class declaration or |
getClasses
getClasses()Gets all class declarations.
| Type | Description |
|---|---|
ConstMap<string,ClassyDeclaration> | The class declarations |
getConstant
getConstant(string $name)Gets a constant declaration.
| Name | Type | Description |
|---|---|---|
$name | string |
| Type | Description |
|---|---|
?ConstantDeclaration | The constant declaration or |
getFile
getFile(string $name)Gets a file definition.
| Name | Type | Description |
|---|---|---|
$name | string | The file name |
| Type | Description |
|---|---|
?FileDeclaration | The file declaration or |
getFiles
getFiles()Gets the file definitions.
| Type | Description |
|---|---|
ConstMap<string,FileDeclaration> | The file definitions |
getFunction
getFunction(string $name)Gets a function declaration.
| Name | Type | Description |
|---|---|---|
$name | string | The function name |
| Type | Description |
|---|---|
?FunctionDeclaration | The function declaration or |
getNamespaces
getNamespaces()Gets the namespaces of the tokens.
| Type | Description |
|---|---|
ConstSet<string> | The token namespaces |
getTokens
getTokens()Gets a list of all tokens
| Type | Description |
|---|---|
ConstVector<ScannedBase> |
getTokensByFilename
getTokensByFilename()Gets all tokens by filename.
| Type | Description |
|---|---|
ImmMap<string,ImmVector<ScannedBase>> | The tokens by filename |
getTokensByName
getTokensByName()Gets all tokens by their name.
| Type | Description |
|---|---|
ImmMap<string,ScannedBase> | The tokens by name |
getTokensByNamespace
getTokensByNamespace()Gets all tokens by namespace name.
| Type | Description |
|---|---|
ImmMap<string,ImmVector<ScannedBase>> | The tokens by namespace name |