public function hasEdge($graph, $edgeId)
    {
        try {
            // will throw ServerException if entry could not be retrieved
            $this->getEdge($graph, $edgeId);

            return true;
        } catch (ServerException $e) {
            // we are expecting a 404 to return boolean false
            if ($e->getCode() === 404) {
                return false;
            }

            // just rethrow
            throw $e;
        }
    }
public function hasEdge($graph, $edgeId)
    {
        try {
            // will throw ServerException if entry could not be retrieved
            $this->getEdge($graph, $edgeId);

            return true;
        } catch (ServerException $e) {
            // we are expecting a 404 to return boolean false
            if ($e->getCode() === 404) {
                return false;
            }

            // just rethrow
            throw $e;
        }
    }
public function hasEdge ( $ graph , $ edgeId ) { try { // will throw ServerException if entry could not be retrieved $ this -> getEdge ( $ graph , $ edgeId ) ; return true ; } catch ( ServerException $ e ) { // we are expecting a 404 to return boolean false if ( $ e -> getCode ( ) === 404 ) { return false ; } // just rethrow throw $ e ; } }
Check if an edge exists

This will call self::getEdge() internally and checks if there
was an exception thrown which represents an 404 request.

@throws Exception When any other error than a 404 occurs

@param mixed $graph  - graph name as a string or instance of Graph
@param mixed $edgeId - the vertex identifier

@return boolean
Check if an edge exists