NodeExtractorInterface
interface NodeExtractorInterface implements FunctionNodeExtractorInterface, ClassNodeExtractorInterface, InterfaceNodeExtractorInterface, EnumNodeExtractorInterface, ConstantNodeExtractorInterface (View source)
Composite interface for extracting all AST node types from PHP stub code.
Extends 5 focused interfaces following ISP. Implementations that support all node types (e.g., NikicNodeExtractor) implement this interface. Clients that only need a subset should depend on the focused interface.
Methods
Extract all class nodes with their import context.
Extract all interface nodes with their import context.
Extract all enum nodes with their import context.
Extract all define() constant nodes.
Extract all const declarations (const A = 1;).
Details
FunctionNode
extractFunction(string $stubCode)
No description
array
extractAllFunctions(string $stubCode)
No description
ClassNode
extractClass(string $stubCode)
No description
array
extractAllClasses(string $stubCode)
No description
array
extractAllClassesWithImports(string $stubCode)
Extract all class nodes with their import context.
array
extractAllInterfaces(string $stubCode)
No description
array
extractAllInterfacesWithImports(string $stubCode)
Extract all interface nodes with their import context.
array
extractAllEnums(string $stubCode)
No description
array
extractAllEnumsWithImports(string $stubCode)
Extract all enum nodes with their import context.
array
extractAllDefineConstants(string $stubCode)
Extract all define() constant nodes.
array
extractAllModernConstants(string $stubCode)
Extract all const declarations (const A = 1;).