@return NodeInterface

@throws \RuntimeException
177375
public function getNode()
    {
        if (!$this->node) {
            throw new \RuntimeException(sprintf(
                'Trying to retrieve node when no node has been set. An event ' .
                'listener should have set the node when persisting document "%s"',
                DocumentHelper::getDebugTitle($this->document)
            ));
        }

        return $this->node;
    }
689837
public function getConfigTreeBuilder()
    {
        $treeBuilder = new TreeBuilder('sentry');
        /** @var ArrayNodeDefinition $rootNode */
        $rootNode = \method_exists(TreeBuilder::class, 'getRootNode')
            ? $treeBuilder->getRootNode()
            : $treeBuilder->root('sentry');

        // Basic Sentry configuration
        $rootNode->children()
            ->scalarNode('dsn')
            ->defaultNull()
            ->beforeNormalization()
            ->ifString()
            ->then($this->getTrimClosure());

        // Options array (to be passed to Sentry\Options constructor) -- please keep alphabetical order!
        $optionsNode = $rootNode->children()
            ->arrayNode('options')
            ->addDefaultsIfNotSet();

        $defaultValues = new Options();
        $optionsChildNodes = $optionsNode->children();

        $optionsChildNodes->booleanNode('attach_stacktrace');
        $optionsChildNodes->variableNode('before_breadcrumb')
            ->validate()
            ->ifTrue($this->isNotAValidCallback())
            ->thenInvalid('Expecting callable or service reference, got %s');
        $optionsChildNodes->variableNode('before_send')
            ->validate()
            ->ifTrue($this->isNotAValidCallback())
            ->thenInvalid('Expecting callable or service reference, got %s');
        if (PrettyVersions::getVersion('sentry/sentry')->getPrettyVersion() !== '2.0.0') {
            $optionsChildNodes->booleanNode('capture_silenced_errors');
        }
        $optionsChildNodes->integerNode('context_lines')
            ->min(0)
            ->max(99);
        $optionsChildNodes->booleanNode('default_integrations');
        $optionsChildNodes->booleanNode('enable_compression');
        $optionsChildNodes->scalarNode('environment')
            ->defaultValue('%kernel.environment%')
            ->cannotBeEmpty();
        $optionsChildNodes->scalarNode('error_types');
        $optionsChildNodes->arrayNode('in_app_exclude')
            ->defaultValue([
                '%kernel.cache_dir%',
                $this->getProjectRoot() . '/vendor',
            ])
            ->prototype('scalar');
        $optionsChildNodes->arrayNode('excluded_exceptions')
            ->defaultValue($defaultValues->getExcludedExceptions())
            ->prototype('scalar');
        $optionsChildNodes->scalarNode('http_proxy');
        $optionsChildNodes->arrayNode('integrations')
            ->prototype('scalar')
            ->validate()
            ->ifTrue(function ($value): bool {
                if (! is_string($value)) {
                    return true;
                }

                return '@' !== substr($value, 0, 1);
            })
            ->thenInvalid('Expecting service reference, got %s');
        $optionsChildNodes->scalarNode('logger');
        $optionsChildNodes->integerNode('max_breadcrumbs')
            ->min(1);
        $optionsChildNodes->integerNode('max_value_length')
            ->min(1);
        $optionsChildNodes->arrayNode('prefixes')
            ->defaultValue($defaultValues->getPrefixes())
            ->prototype('scalar');
        $optionsChildNodes->scalarNode('project_root')
            ->defaultValue($this->getProjectRoot());
        $optionsChildNodes->scalarNode('release');
        $optionsChildNodes->floatNode('sample_rate')
            ->min(0.0)
            ->max(1.0);
        $optionsChildNodes->integerNode('send_attempts')
            ->min(1);
        $optionsChildNodes->booleanNode('send_default_pii');
        $optionsChildNodes->scalarNode('server_name');
        $optionsChildNodes->arrayNode('tags')
            ->normalizeKeys(false)
            ->prototype('scalar');

        // Bundle-specific configuration
        $listenerPriorities = $rootNode->children()
            ->arrayNode('listener_priorities')
            ->addDefaultsIfNotSet()
            ->children();
        $listenerPriorities->scalarNode('request')
            ->defaultValue(1);
        $listenerPriorities->scalarNode('sub_request')
            ->defaultValue(1);
        $listenerPriorities->scalarNode('console')
            ->defaultValue(1);
        $listenerPriorities->scalarNode('request_error')
            ->defaultValue(128);
        $listenerPriorities->scalarNode('console_error')
            ->defaultValue(128);

        return $treeBuilder;
    }
952500
public function getNodeType()
    {
        $bag = hierarchy_bag('nodetype');

        if ($this->relationLoaded('nodeType'))
        {
            $nodeType = $this->getRelation('nodeType');
        } elseif ($nodeType = $bag->getNodeType($this->getNodeTypeKey()))
        {
            $this->setRelation('nodeType', $nodeType);
        } else
        {
            $nodeType = $this->load('nodeType')->getRelation('nodeType');
        }

        if ($nodeType)
        {
            $bag->addNodeType($nodeType);

            return $nodeType;
        }

        return null;
    }
1188959
public function setId(string $id): NodeInterface
    {
        $this->_id = $id;

        if ($this->_name === null) {
            $this->setName($id);
        }

        return $this;
    }
696733
public function connect()
    {
        $crotch = new Node(self::TYPE_CROTCH, self::OPERATOR_BLANK, null);
        $crotch->children = \array_merge($crotch->children, $this->children);
        $crotch->isNegatingWholeChildren = $this->isNegatingWholeChildren;
        $this->isNegatingWholeChildren = false;
        $this->children = [$crotch];
        
        return $this;
    }
160075
public function getData()
    {
        if ($this->config->getInheritData()) {
            if (!$this->parent) {
                throw new RuntimeException('The block is configured to inherit its parent\'s data, but does not have a parent.');
            }

            return $this->parent->getData();
        }

        if (!$this->defaultDataSet) {
            $this->setData($this->config->getData());
        }

        return $this->modelData;
    }
117999
public function send(): ClientRequestInterface
   {
       try {
           $this->response = new ClientResponse(
               new ClientResponseStream($this));
       } catch (InvalidArgumentException $e) {
           throw new RuntimeException(
               "Can't send client request: " . $e->getMessage());
       }
       return $this;
   }
443204
public function xml()
    {
        try {
            // Allow XML to be retrieved even if there is no response body
            $xml = new \SimpleXMLElement((string) $this->body ?: '<root />');
        } catch (\Exception $e) {
            throw new RuntimeException('Unable to parse response body into XML: ' . $e->getMessage());
        }

        return $xml;
    }
115407
protected function getNodeBuilder()
    {
        if (null === $this->nodeBuilder) {
            $this->nodeBuilder = new NodeBuilder();
        }

        return $this->nodeBuilder->setParent($this);
    }
1000451
public function getRootNodeMenuItem()
    {
        if (is_null($this->rootNodeMenuItem)) {
            $rootNode = $this->domainConfiguration->getRootNode();
            if (!is_null($rootNode)) {
                $nodeTranslation = $rootNode->getNodeTranslation(
                    $this->locale,
                    $this->includeOffline
                );
                $this->rootNodeMenuItem = new NodeMenuItem(
                    $rootNode,
                    $nodeTranslation,
                    false,
                    $this
                );
            } else {
                $this->rootNodeMenuItem = $this->breadCrumb[0];
            }
        }

        return $this->rootNodeMenuItem;
    }
1203118
public function getConfigTreeBuilder()
    {
        $node = $this->getRootNode();
        $node = $node->children();
        $node = $this->getChildren($node);
        $node = $node->end();

        return $node;
    }
452009
public function buildTree()
    {
        if (null === $this->root) {
            throw new \RuntimeException('The configuration tree has no root node.');
        }
        if (null !== $this->tree) {
            return $this->tree;
        }

        return $this->tree = $this->root->getNode(true);
    }
1179313
public function getControlHandler() {
		if ($this->_controlHandler === null) {
			if ($this->hasLocator() && $this->getLocator()->has($this->_controlHandlerServiceId)) {
				$this->_controlHandler = $this->getLocator()->get($this->_controlHandlerServiceId);
				
				if (! $this->_controlHandler instanceof ControlHandlerInterface) {
					throw new RuntimeException('Pagination control handler must implement "ControlHandlerInterface"');
				}
			} else {
				$this->_controlHandler = new Sliding();
			}
		}
		
		return $this->_controlHandler;
	}
728038
protected function createNode(NodeInterface $parent)
    {
        $nodeType = $this->getNodeType();
        $name = $this->getName() ?: $this->nodeService->generateUniqueNodeName($parent->getPath());

        $node = $parent->createNode($name, $nodeType);

        $this->applyNodeCreationHandlers($node);

        $this->finish($node);
        // NOTE: we need to run "finish" before "addNodeCreatedFeedback" to ensure the new node already exists when the last feedback is processed
        $this->addNodeCreatedFeedback($node);

        return $node;
    }
724136
public function createFromNode(NodeInterface $node)
    {
        $item = $this->createItem($node->getName(), $node->getOptions());
        /* @var $childNode NodeInterface */
        foreach ($node->getChildren() as $childNode) {
            $item->addChild($this->createFromNode($childNode));
        }

        return $item;
    }
238809
public function setNode(NodeInterface $node = null)
    {
        $this->node = $node;

        if ($node->getMenu() !== $this) {
            $node->setMenu($this);
        }

        return $this;
    }
900536
public function enterNode(NodeInterface $node): VisitorResult
    {
        $schema = $this->typeInfo->getSchema();

        if ($node instanceof SelectionSetNode) {
            $namedType = getNamedType($this->typeInfo->getType());
            $this->typeInfo->pushParentType($namedType instanceof CompositeTypeInterface ? $namedType : null);
        } elseif ($node instanceof FieldNode) {
            $parentType      = $this->typeInfo->getParentType();
            $fieldDefinition = null;
            $fieldType       = null;
            if (null !== $parentType) {
                $fieldDefinition = $this->typeInfo->resolveFieldDefinition($schema, $parentType, $node);
                if (null !== $fieldDefinition) {
                    $fieldType = $fieldDefinition->getType();
                }
            }
            $this->typeInfo->pushFieldDefinition($fieldDefinition);
            $this->typeInfo->pushType(isOutputType($fieldType) ? $fieldType : null);
        } elseif ($node instanceof DirectiveNode) {
            $this->typeInfo->setDirective($schema->getDirective($node->getNameValue()));
        } elseif ($node instanceof OperationDefinitionNode) {
            $type      = null;
            $operation = $node->getOperation();
            if ($operation === 'query') {
                $type = $schema->getQueryType();
            } elseif ($operation === 'mutation') {
                $type = $schema->getMutationType();
            } elseif ($operation === 'subscription') {
                $type = $schema->getSubscriptionType();
            }
            $this->typeInfo->pushType($type instanceof ObjectType ? $type : null);
        } elseif ($node instanceof InlineFragmentNode || $node instanceof FragmentDefinitionNode) {
            $typeCondition = $node->getTypeCondition();
            $outputType    = null !== $typeCondition
                ? TypeASTConverter::convert($schema, $typeCondition)
                : getNamedType($this->typeInfo->getType());
            $this->typeInfo->pushType(isOutputType($outputType) ? $outputType : null);
        } elseif ($node instanceof VariableDefinitionNode) {
            $inputType = TypeASTConverter::convert($schema, $node->getType());
            /** @noinspection PhpParamsInspection */
            $this->typeInfo->pushInputType(isInputType($inputType) ? $inputType : null);
        } elseif ($node instanceof ArgumentNode) {
            $argumentType       = null;
            $argumentDefinition = null;
            $fieldOrDirective   = $this->typeInfo->getDirective() ?: $this->typeInfo->getFieldDefinition();
            if (null !== $fieldOrDirective) {
                $argumentDefinition = find(
                    $fieldOrDirective->getArguments(),
                    function (Argument $argument) use ($node) {
                        return $argument->getName() === $node->getNameValue();
                    }
                );
                if (null !== $argumentDefinition) {
                    $argumentType = $argumentDefinition->getType();
                }
            }
            $this->typeInfo->setArgument($argumentDefinition);
            $this->typeInfo->pushInputType(isInputType($argumentType) ? $argumentType : null);
        } elseif ($node instanceof ListValueNode) {
            $listType = getNullableType($this->typeInfo->getInputType());
            $itemType = $listType instanceof ListType ? $listType->getOfType() : $listType;
            $this->typeInfo->pushInputType(isInputType($itemType) ? $itemType : null);
        } elseif ($node instanceof ObjectFieldNode) {
            $objectType     = getNamedType($this->typeInfo->getInputType());
            $inputFieldType = null;
            if ($objectType instanceof InputObjectType) {
                $fields     = $objectType->getFields();
                $inputField = $fields[$node->getNameValue()] ?? null;
                if (null !== $inputField) {
                    $inputFieldType = $inputField->getType();
                }
            }
            /** @noinspection PhpParamsInspection */
            $this->typeInfo->pushInputType(isInputType($inputFieldType) ? $inputFieldType : null);
        } elseif ($node instanceof EnumValueNode) {
            $enumType  = getNamedType($this->typeInfo->getInputType());
            $enumValue = null;
            if ($enumType instanceof EnumType) {
                $enumValue = $enumType->getValue($node->getValue());
            }
            $this->typeInfo->setEnumValue($enumValue);
        }

        return $this->visitor->enterNode($node);
    }