/** * Returns count of all present nodes in graph database * @return int Count of nodes */ public function CountAllNodes() { $client = $this->getRPCClient(); $req = new StatusRequest(); $req->setTime(time()); list($resp, $status) = $client->GetStatus($req, array('timeout' => $this->_config->timeout))->wait(); return $resp->getNNodes(); }
/** * Get count of links in graph * @return int Count of links */ function CountAllLinks() { $client = $this->getRPCClient(); $req = new StatusRequest(); $req->setTime(time()); $call = $client->GetStatus($req, array('timeout' => $this->_config->timeout)); list($reply, $status) = $call->wait(); return $reply->getNLinks(); }