public function getGraph($graph, array $options = [])
    {
        $url = UrlHelper::buildUrl(Urls::URL_GRAPH, [$graph]);

        try {
            $response = $this->getConnection()->get($url);
        } catch (Exception $e) {
            return false;
        }

        $data = $response->getJson();

        $options['_isNew'] = false;
        
        $result = Graph::createFromArray($data['graph'], $options);
        $result->set(Graph::ENTRY_KEY, $data['graph'][self::OPTION_NAME]);

        return $result;
    }
public function getGraph($graph, array $options = [])
    {
        $url = UrlHelper::buildUrl(Urls::URL_GRAPH, [$graph]);

        try {
            $response = $this->getConnection()->get($url);
        } catch (Exception $e) {
            return false;
        }

        $data = $response->getJson();

        $options['_isNew'] = false;
        
        $result = Graph::createFromArray($data['graph'], $options);
        $result->set(Graph::ENTRY_KEY, $data['graph'][self::OPTION_NAME]);

        return $result;
    }
public function getGraph ( $ graph , array $ options = [ ] ) { $ url = UrlHelper :: buildUrl ( Urls :: URL_GRAPH , [ $ graph ] ) ; try { $ response = $ this -> getConnection ( ) -> get ( $ url ) ; } catch ( Exception $ e ) { return false ; } $ data = $ response -> getJson ( ) ; $ options [ '_isNew' ] = false ; $ result = Graph :: createFromArray ( $ data [ 'graph' ] , $ options ) ; $ result -> set ( Graph :: ENTRY_KEY , $ data [ 'graph' ] [ self :: OPTION_NAME ] ) ; return $ result ; }
Get a graph

This will get a graph.<br><br>

@param String $graph   - The name of the graph
@param array  $options - Options to pass to the method

@return Graph|false
@throws \ArangoDBClient\ClientException
@since   1.2
Get a graph