NikicNodeExtractor
class NikicNodeExtractor implements NodeExtractorInterface (View source)
Nikic/php-parser implementation of NodeExtractorInterface.
Extracts AST nodes from PHP stub code using nikic/php-parser and wraps them in adapter objects.
Methods
No description
No description
No description
No description
Extract all classes with their import context from stub code.
No description
No description
Extract all interfaces with their import context from stub code.
No description
Extract all enums with their import context from stub code.
Extract all define() constant nodes.
Extract all const declarations (const A = 1;).
Details
__construct()
No description
FunctionNode
extractFunction(string $stubCode)
No description
ClassNode
extractClass(string $stubCode)
No description
array
extractAllClasses(string $stubCode)
No description
array
extractAllClassesWithImports(string $stubCode)
Extract all classes with their import context from stub code.
Returns array of ['node' => ClassNode, 'imports' => array].
array
extractAllFunctions(string $stubCode)
No description
array
extractAllInterfaces(string $stubCode)
No description
array
extractAllInterfacesWithImports(string $stubCode)
Extract all interfaces with their import context from stub code.
Returns array of ['node' => InterfaceNode, 'imports' => array].
array
extractAllEnums(string $stubCode)
No description
array
extractAllEnumsWithImports(string $stubCode)
Extract all enums with their import context from stub code.
Returns array of ['node' => EnumNode, 'imports' => array].
array
extractAllDefineConstants(string $stubCode)
Extract all define() constant nodes.
array
extractAllModernConstants(string $stubCode)
Extract all const declarations (const A = 1;).