Automattic\WooCommerce\Vendor\GraphQL\Utils
TypeInfo::leave
Method of the class: TypeInfo{}
No Hooks.
Returns
null. Nothing (null).
Usage
$TypeInfo = new TypeInfo(); $TypeInfo->leave( $node ): void;
- $node(Node) (required)
- .
TypeInfo::leave() TypeInfo::leave code WC 10.9.4
public function leave(Node $node): void
{
switch ($node->kind) {
case NodeKind::SELECTION_SET:
array_pop($this->parentTypeStack);
break;
case NodeKind::FIELD:
array_pop($this->fieldDefStack);
array_pop($this->typeStack);
break;
case NodeKind::DIRECTIVE:
$this->directive = null;
break;
case NodeKind::OPERATION_DEFINITION:
case NodeKind::INLINE_FRAGMENT:
case NodeKind::FRAGMENT_DEFINITION:
array_pop($this->typeStack);
break;
case NodeKind::VARIABLE_DEFINITION:
array_pop($this->inputTypeStack);
break;
case NodeKind::ARGUMENT:
$this->argument = null;
array_pop($this->defaultValueStack);
array_pop($this->inputTypeStack);
break;
case NodeKind::LST:
case NodeKind::OBJECT_FIELD:
array_pop($this->defaultValueStack);
array_pop($this->inputTypeStack);
break;
case NodeKind::ENUM:
$this->enumValue = null;
break;
}
}