public function getEdgeCollections($graph)
    {
        if ($graph instanceof Graph) {
            $graph = $graph->getKey();
        }

        $_useCache = $this->cacheEnabled;

        if ($_useCache === true && !empty($this->cache[$graph]['edgeCollections'])) {
            return $this->cache[$graph]['edgeCollections'];
        }

        $url = UrlHelper::buildUrl(Urls::URL_GRAPH, [$graph, Urls::URLPART_EDGE]);

        $connection       = $this->getConnection();
        $batchCaptureMode = $connection->isInBatchCaptureMode();

        if ($batchCaptureMode === true) {
            $this->getConnection()->setBatchRequest(false);
        }

        try {
            $response = $this->getConnection()->get($url);
        } catch (Exception $e) {
            throw new ClientException($e->getMessage());
        }

        if ($batchCaptureMode === true) {
            $this->getConnection()->setBatchRequest(true);
        }

        $data = $response->getJson();
        $data = $data[self::OPTION_COLLECTIONS];

        sort($data);

        if ($_useCache === true && !empty($this->cache[$graph]['edgeCollections'])) {
            $this->cache[$graph]['edgeCollections'] = $data;
        }

        return $data;
    }
public function getEdgeCollections($graph)
    {
        if ($graph instanceof Graph) {
            $graph = $graph->getKey();
        }

        $_useCache = $this->cacheEnabled;

        if ($_useCache === true && !empty($this->cache[$graph]['edgeCollections'])) {
            return $this->cache[$graph]['edgeCollections'];
        }

        $url = UrlHelper::buildUrl(Urls::URL_GRAPH, [$graph, Urls::URLPART_EDGE]);

        $connection       = $this->getConnection();
        $batchCaptureMode = $connection->isInBatchCaptureMode();

        if ($batchCaptureMode === true) {
            $this->getConnection()->setBatchRequest(false);
        }

        try {
            $response = $this->getConnection()->get($url);
        } catch (Exception $e) {
            throw new ClientException($e->getMessage());
        }

        if ($batchCaptureMode === true) {
            $this->getConnection()->setBatchRequest(true);
        }

        $data = $response->getJson();
        $data = $data[self::OPTION_COLLECTIONS];

        sort($data);

        if ($_useCache === true && !empty($this->cache[$graph]['edgeCollections'])) {
            $this->cache[$graph]['edgeCollections'] = $data;
        }

        return $data;
    }
public function getEdgeCollections ( $ graph ) { if ( $ graph instanceof Graph ) { $ graph = $ graph -> getKey ( ) ; } $ _useCache = $ this -> cacheEnabled ; if ( $ _useCache === true && ! empty ( $ this -> cache [ $ graph ] [ 'edgeCollections' ] ) ) { return $ this -> cache [ $ graph ] [ 'edgeCollections' ] ; } $ url = UrlHelper :: buildUrl ( Urls :: URL_GRAPH , [ $ graph , Urls :: URLPART_EDGE ] ) ; $ connection = $ this -> getConnection ( ) ; $ batchCaptureMode = $ connection -> isInBatchCaptureMode ( ) ; if ( $ batchCaptureMode === true ) { $ this -> getConnection ( ) -> setBatchRequest ( false ) ; } try { $ response = $ this -> getConnection ( ) -> get ( $ url ) ; } catch ( Exception $ e ) { throw new ClientException ( $ e -> getMessage ( ) ) ; } if ( $ batchCaptureMode === true ) { $ this -> getConnection ( ) -> setBatchRequest ( true ) ; } $ data = $ response -> getJson ( ) ; $ data = $ data [ self :: OPTION_COLLECTIONS ] ; sort ( $ data ) ; if ( $ _useCache === true && ! empty ( $ this -> cache [ $ graph ] [ 'edgeCollections' ] ) ) { $ this -> cache [ $ graph ] [ 'edgeCollections' ] = $ data ; } return $ data ; }
gets all edge collections from the graph.

This will get all edge collections from the graph.<br><br>

If this method or any method that calls this method is used in batch mode and caching is off,<br>
then for each call, this method will make an out of batch API call to the db in order to get the appropriate collections.<br><br>

If caching is on, then the GraphHandler will only call the DB API once for the chosen graph, and return data from cache for the following calls.<br>

@throws Exception

@param mixed $graph - graph name as a string or instance of Graph

@return array

@since 2.2
gets all edge collections from the graph .