ArgumentNode.php
2 months ago
BooleanValueNode.php
2 months ago
DefinitionNode.php
2 months ago
DirectiveDefinitionNode.php
2 months ago
DirectiveNode.php
2 months ago
DocumentNode.php
2 months ago
EnumTypeDefinitionNode.php
2 months ago
EnumTypeExtensionNode.php
2 months ago
EnumValueDefinitionNode.php
2 months ago
EnumValueNode.php
2 months ago
ExecutableDefinitionNode.php
2 months ago
FieldDefinitionNode.php
2 months ago
FieldNode.php
2 months ago
FloatValueNode.php
2 months ago
FragmentDefinitionNode.php
2 months ago
FragmentSpreadNode.php
2 months ago
HasSelectionSet.php
2 months ago
InlineFragmentNode.php
2 months ago
InputObjectTypeDefinitionNode.php
2 months ago
InputObjectTypeExtensionNode.php
2 months ago
InputValueDefinitionNode.php
2 months ago
IntValueNode.php
2 months ago
InterfaceTypeDefinitionNode.php
2 months ago
InterfaceTypeExtensionNode.php
2 months ago
ListTypeNode.php
2 months ago
ListValueNode.php
2 months ago
Location.php
2 months ago
NameNode.php
2 months ago
NamedTypeNode.php
2 months ago
Node.php
2 months ago
NodeKind.php
2 months ago
NodeList.php
2 months ago
NonNullTypeNode.php
2 months ago
NullValueNode.php
2 months ago
ObjectFieldNode.php
2 months ago
ObjectTypeDefinitionNode.php
2 months ago
ObjectTypeExtensionNode.php
2 months ago
ObjectValueNode.php
2 months ago
OperationDefinitionNode.php
2 months ago
OperationTypeDefinitionNode.php
2 months ago
ScalarTypeDefinitionNode.php
2 months ago
ScalarTypeExtensionNode.php
2 months ago
SchemaDefinitionNode.php
2 months ago
SchemaExtensionNode.php
2 months ago
SelectionNode.php
2 months ago
SelectionSetNode.php
2 months ago
StringValueNode.php
2 months ago
TypeDefinitionNode.php
2 months ago
TypeExtensionNode.php
2 months ago
TypeNode.php
2 months ago
TypeSystemDefinitionNode.php
2 months ago
TypeSystemExtensionNode.php
2 months ago
UnionTypeDefinitionNode.php
2 months ago
UnionTypeExtensionNode.php
2 months ago
ValueNode.php
2 months ago
VariableDefinitionNode.php
2 months ago
VariableNode.php
2 months ago
FragmentDefinitionNode.php
39 lines
| 1 | <?php declare(strict_types=1); |
| 2 | |
| 3 | namespace Automattic\WooCommerce\Vendor\GraphQL\Language\AST; |
| 4 | |
| 5 | class FragmentDefinitionNode extends Node implements ExecutableDefinitionNode, HasSelectionSet |
| 6 | { |
| 7 | public string $kind = NodeKind::FRAGMENT_DEFINITION; |
| 8 | |
| 9 | public NameNode $name; |
| 10 | |
| 11 | /** |
| 12 | * Note: fragment variable definitions are experimental and may be changed |
| 13 | * or removed in the future. |
| 14 | * |
| 15 | * Thus, this property is the single exception where this is not always a NodeList but may be null. |
| 16 | * |
| 17 | * @var NodeList<VariableDefinitionNode>|null |
| 18 | */ |
| 19 | public ?NodeList $variableDefinitions = null; |
| 20 | |
| 21 | public NamedTypeNode $typeCondition; |
| 22 | |
| 23 | /** @var NodeList<DirectiveNode> */ |
| 24 | public NodeList $directives; |
| 25 | |
| 26 | public SelectionSetNode $selectionSet; |
| 27 | |
| 28 | public function __construct(array $vars) |
| 29 | { |
| 30 | parent::__construct($vars); |
| 31 | $this->directives ??= new NodeList([]); |
| 32 | } |
| 33 | |
| 34 | public function getSelectionSet(): SelectionSetNode |
| 35 | { |
| 36 | return $this->selectionSet; |
| 37 | } |
| 38 | } |
| 39 |