findEdges example

foreach (['graph', 'node', 'edge', 'node.instance', 'node.definition', 'node.missing'] as $key) {
            if (isset($options[$key])) {
                $this->options[$key] = array_merge($this->options[$key]$options[$key]);
            }
        }

        $this->nodes = $this->findNodes();

        $this->edges = [];
        foreach ($this->container->getDefinitions() as $id => $definition) {
            $this->edges[$id] = array_merge(
                $this->findEdges($id$definition->getArguments(), true, ''),
                $this->findEdges($id$definition->getProperties(), false, '')
            );

            foreach ($definition->getMethodCalls() as $call) {
                $this->edges[$id] = array_merge(
                    $this->edges[$id],
                    $this->findEdges($id$call[1], false, $call[0].'()')
                );
            }
        }

        

    public function dump(Definition $definition, Marking $marking = null, array $options = []): string
    {
        $withMetadata = $options['with-metadata'] ?? false;

        $places = $this->findPlaces($definition$withMetadata$marking);
        $edges = $this->findEdges($definition);

        $options = array_replace_recursive(self::$defaultOptions$options);

        $label = $this->formatLabel($definition$withMetadata$options);

        return $this->startDot($options$label)
            .$this->addPlaces($places$withMetadata)
            .$this->addEdges($edges)
            .$this->endDot();
    }

    
foreach (['graph', 'node', 'edge', 'node.instance', 'node.definition', 'node.missing'] as $key) {
            if (isset($options[$key])) {
                $this->options[$key] = array_merge($this->options[$key]$options[$key]);
            }
        }

        $this->nodes = $this->findNodes();

        $this->edges = [];
        foreach ($this->container->getDefinitions() as $id => $definition) {
            $this->edges[$id] = array_merge(
                $this->findEdges($id$definition->getArguments(), true, ''),
                $this->findEdges($id$definition->getProperties(), false, '')
            );

            foreach ($definition->getMethodCalls() as $call) {
                $this->edges[$id] = array_merge(
                    $this->edges[$id],
                    $this->findEdges($id$call[1], false, $call[0].'()')
                );
            }
        }

        

    public function dump(StateMachineEntity $stateMachine, array $options = []): string
    {
        $places = $this->findStates($stateMachine);
        $edges = $this->findEdges($stateMachine);

        $options = array_replace_recursive(self::$defaultOptions$options);

        return $this->startDot($options)
            . $this->addStates($places)
            . $this->addEdges($edges)
            . $this->endDot();
    }

    /** * @return array<string, array<string, array<string, string>>> */

    public function dump(Definition $definition, Marking $marking = null, array $options = []): string
    {
        $withMetadata = $options['with-metadata'] ?? false;

        $places = $this->findPlaces($definition$withMetadata$marking);
        $transitions = $this->findTransitions($definition$withMetadata);
        $edges = $this->findEdges($definition);

        $options = array_replace_recursive(self::$defaultOptions$options);

        $label = $this->formatLabel($definition$withMetadata$options);

        return $this->startDot($options$label)
            .$this->addPlaces($places$withMetadata)
            .$this->addTransitions($transitions$withMetadata)
            .$this->addEdges($edges)
            .$this->endDot();
    }

    
Home | Imprint | This part of the site doesn't use cookies.