Ostico / PhpOrient

PhpOrient - Official Php driver based on the binary protocol of OrientDB.
Other
68 stars 37 forks source link

ClustersMap -> getClusterName( $ID ) ? #63

Open fsieduc opened 8 years ago

fsieduc commented 8 years ago

I'm trying to find a way of "reversing" a RID to its Vertex class name.

Please, could you add this method into PhpOrient\Protocols\Common\ClustersMap.php ?

/**
 * Give the name of the cluster $ID
 *
 * @param int $ID
 * @return string|null
 */
public function getClusterName( $ID ){
    return isset($this->reverseIDMap[ $ID ]) ? $this->reverseIDMap[ $ID ][1] : null;
}