ParserNamespace
Less than 1 minute
ParserNamespace
Parses namespace declarations and stores namespace-scoped symbols.
class ParserNamespace extends \Hazaar\Parser\PHP\TokenParserExtends: Hazaar\Parser\PHP\TokenParser
Properties
docBlock
public DocBlock $docBlockType: Hazaar\Parser\DocBlock
constants
Constants declared within this namespace.
public array $constantsType: array
classes
Classes declared within this namespace.
public array $classesType: array
interfaces
Interfaces declared within this namespace.
public array $interfacesType: array
functions
Functions declared within this namespace.
public array $functionsType: array
traits
Traits declared within this namespace.
public array $traitsType: array
enums
Enums declared within this namespace.
public array $enumsType: array
Methods
apply
Apply the namespace to the given array of namespaces.
public apply(string $namespace): stringReturns: string
Parameters
| Parameter | Type | Description |
|---|---|---|
$namespace | string |
parse
Parses a namespace declaration from the current token position.
protected parse(array $tokens): boolReturns: bool
Parameters
| Parameter | Type | Description |
|---|---|---|
$tokens | array | token stream used by the parser |
Generated by Hazaar API Doc Generator on Fri, 04 Sep 2026 23:32:16 +0000