Automattic\WooCommerce\Vendor\GraphQL\Language
Parser::parseImplementsInterfaces
Method of the class: Parser{}
No Hooks.
Returns
NodeList<NamedTypeNode>.
Usage
// private - for code of main (parent) class only $result = $this->parseImplementsInterfaces(): NodeList;
Parser::parseImplementsInterfaces() Parser::parseImplementsInterfaces code WC 11.1.2
private function parseImplementsInterfaces(): NodeList
{
$types = [];
if ($this->expectOptionalKeyword('implements')) {
// Optional leading ampersand
$this->skip(Token::AMP);
do {
$types[] = $this->parseNamedType();
} while (
$this->skip(Token::AMP)
// Legacy support for the SDL?
|| (($this->lexer->options['allowLegacySDLImplementsInterfaces'] ?? false) && $this->peek(Token::NAME))
);
}
return new NodeList($types);
}