Neo4j.php
protected function indexEdge(array $entity): void
    {
        //$tail_id = $entity[]
        $entity["attributes"]["udid"] = $entity["id"];
        $cq = sprintf("MATCH(t {udid: {tail}}), (h {udid: {head}}) MERGE (t)-[e:%s {udid: {udid}}]->(h) SET e = {data}", $entity["label"]);
        $result = $this->client->run($cq, [
            "tail" => $entity["tail"],
            "head" => $entity["head"],
            "udid" => $entity["id"],
            "data" => $entity["attributes"]
        ]);
    }
protected function indexEdge(array $entity): void
    {
        //$tail_id = $entity[]
        $entity["attributes"]["udid"] = $entity["id"];
        $cq = sprintf("MATCH(t {udid: {tail}}), (h {udid: {head}}) MERGE (t)-[e:%s {udid: {udid}}]->(h) SET e = {data}", $entity["label"]);
        $result = $this->client->run($cq, [
            "tail" => $entity["tail"],
            "head" => $entity["head"],
            "udid" => $entity["id"],
            "data" => $entity["attributes"]
        ]);
    }
protected function indexEdge ( array $ entity ) : void { //$tail_id = $entity[] $ entity [ "attributes" ] [ "udid" ] = $ entity [ "id" ] ; $ cq = sprintf ( "MATCH(t {udid: {tail}}), (h {udid: {head}}) MERGE (t)-[e:%s {udid: {udid}}]->(h) SET e = {data}" , $ entity [ "label" ] ) ; $ result = $ this -> client -> run ( $ cq , [ "tail" => $ entity [ "tail" ] , "head" => $ entity [ "head" ] , "udid" => $ entity [ "id" ] , "data" => $ entity [ "attributes" ] ] ) ; }
Indexes an edge

@param array $entity In array form.

@return void
Indexes an edge