public function addConnection( $src, $dst )
    {
        $this->edges[$src][] = $dst;

        // Remove node with new incoming edge from initial leaves array
        if ( ( $id = array_search( $dst, $this->leaves ) ) !== false )
        {
            unset( $this->leaves[$id] );
        }
    }
public function addConnection( $src, $dst )
    {
        $this->edges[$src][] = $dst;

        // Remove node with new incoming edge from initial leaves array
        if ( ( $id = array_search( $dst, $this->leaves ) ) !== false )
        {
            unset( $this->leaves[$id] );
        }
    }
public function addConnection ( $ src , $ dst ) { $ this -> edges [ $ src ] [ ] = $ dst ; // Remove node with new incoming edge from initial leaves array if ( ( $ id = array_search ( $ dst , $ this -> leaves ) ) !== false ) { unset ( $ this -> leaves [ $ id ] ) ; } }
Add directed connection to the graph

Add a connection from node $src to node $dst to the graph.

@param string $src
@param string $dst
@return void
Add directed connection to the graph