private function loadGraph(Graph $graph)
    {
        foreach ($graph->nodes as $node) {
            $this->addNode($node);
        }

        foreach ($graph->edges as $edge) {
            $this->addEdge($edge);
        }

        foreach ($graph->initializers as $initializer) {
            $this->addInitial(
                $initializer[self::SOURCE][self::DATA],
                $initializer[self::TARGET][self::NODE],
                $initializer[self::TARGET][self::PORT]
            );
        }
    }
private function loadGraph(Graph $graph)
    {
        foreach ($graph->nodes as $node) {
            $this->addNode($node);
        }

        foreach ($graph->edges as $edge) {
            $this->addEdge($edge);
        }

        foreach ($graph->initializers as $initializer) {
            $this->addInitial(
                $initializer[self::SOURCE][self::DATA],
                $initializer[self::TARGET][self::NODE],
                $initializer[self::TARGET][self::PORT]
            );
        }
    }
private function loadGraph ( Graph $ graph ) { foreach ( $ graph -> nodes as $ node ) { $ this -> addNode ( $ node ) ; } foreach ( $ graph -> edges as $ edge ) { $ this -> addEdge ( $ edge ) ; } foreach ( $ graph -> initializers as $ initializer ) { $ this -> addInitial ( $ initializer [ self :: SOURCE ] [ self :: DATA ] , $ initializer [ self :: TARGET ] [ self :: NODE ] , $ initializer [ self :: TARGET ] [ self :: PORT ] ) ; } }
Load Graph into Network

@param Graph $graph
Load Graph into Network