WooCommerce Code Reference

FragmentDefinitionNode extends Node
in package
implements ExecutableDefinitionNode, HasSelectionSet

type Node = NameNode | DocumentNode | OperationDefinitionNode | VariableDefinitionNode | VariableNode | SelectionSetNode | FieldNode | ArgumentNode | FragmentSpreadNode | InlineFragmentNode | FragmentDefinitionNode | IntValueNode | FloatValueNode | StringValueNode | BooleanValueNode | EnumValueNode | ListValueNode | ObjectValueNode | ObjectFieldNode | DirectiveNode | ListTypeNode | NonNullTypeNode.

Interfaces, Classes and Traits

ExecutableDefinitionNode
export type ExecutableDefinitionNode = | OperationDefinitionNode | FragmentDefinitionNode;.
HasSelectionSet
export type DefinitionNode = OperationDefinitionNode | FragmentDefinitionNode.

Table of Contents

$directives  : NodeList
$kind  : string
$loc  : Location|null
$name  : NameNode
$selectionSet  : SelectionSetNode
$typeCondition  : NamedTypeNode
$variableDefinitions  : NodeList|null
Note: fragment variable definitions are experimental and may be changed or removed in the future.
__construct()  : mixed
__toString()  : string
cloneDeep()  : static
Returns a clone of this instance and all its children, except Location $loc.
getSelectionSet()  : SelectionSetNode
jsonSerialize()  : array<string, mixed>
Improves upon the default serialization by: - excluding null values - excluding large reference values such as @see Location::$source.
toArray()  : array<string, mixed>
cloneValue()  : mixed
recursiveToArray()  : array<string, mixed>

Properties

$variableDefinitions

Note: fragment variable definitions are experimental and may be changed or removed in the future.

public NodeList|null $variableDefinitions = null

Thus, this property is the single exception where this is not always a NodeList but may be null.

Methods

jsonSerialize()

Improves upon the default serialization by: - excluding null values - excluding large reference values such as @see Location::$source.

public jsonSerialize() : array<string, mixed>
Return values
array<string, mixed>

cloneValue()

protected static cloneValue(mixed $value) : mixed
Parameters
$value : mixed
Tags
template

TNode of Node

template

TCloneable of TNode|NodeList|Location|string

phpstan-param

TCloneable $value

throws
JsonException
throws
InvariantViolation
phpstan-return

TCloneable

Return values
mixed