StubInterfaceParser
class StubInterfaceParser implements MultiEntityStubParserInterface (View source)
Parses PHP interface nodes from AST into PHPInterface domain objects.
Parser-agnostic: works with any AST node implementing InterfaceNode interface. Uses dedicated parsers for child entities (methods, constants).
Methods
No description
Parses stub code string into PHPInterface.
Parses an interface AST node into PHPInterface domain object.
Extract and parse all interfaces from stub content.
Details
__construct(InterfaceNodeExtractorInterface|null $nodeExtractor = null, PhpDocParserInterface|null $phpDocParser = null, TypeParserInterface|null $typeParser = null, AvailableVersionParserInterface|null $versionParser = null)
No description
PHPInterface
parse(string $stubCode)
Parses stub code string into PHPInterface.
This is a convenience method that delegates to parseNode().
PHPInterface
parseNode(InterfaceNode $node, array $imports = [])
Parses an interface AST node into PHPInterface domain object.
Works with any InterfaceNode implementation (parser-agnostic).
array
extractAndParseAll(string $stubContent)
Extract and parse all interfaces from stub content.