PhpOrient - getClusterID()

This method returns the Cluster ID for the given name.

Retrieving Cluster ID's

In cases where you need or would like to operate on a cluster by its Cluster ID, you can retrieve it from the Cluster Map by passing the cluster name as an argument to this method.


  • <cluster-name> Defines the name of the cluster.


For instance, say you want to retrieve records for clusters by cluster name, you might use this method in conjunction with dataClusterDataRange().

function fetchRecords($clusterName){

    // Log Operation
    echo "Retrieving Records on Cluster: $clusterName";

    // Fetch Globals
    global $client;
    global $clusterMap;

    // Find Cluster ID
    $clusterId = $clusterMap->getClusterID($clusterName);

    // Return Records
    return $client->dataClusterDataRange($clusterId);

results matching ""

    No results matching ""