Exemplo n.º 1
0
 /**
  * Default callback for received push Notices
  *
  * @param $command_id
  * @param $payload
  */
 protected function _pushReceived($command_id, $payload)
 {
     # REQUEST_PUSH_RECORD	        79
     # REQUEST_PUSH_DISTRIB_CONFIG	80
     # REQUEST_PUSH_LIVE_QUERY	    81
     # TODO: this logic must stay within Messages class here I just want to receive
     # an object of something, like a new array of cluster.
     # We should register a callback and then execute it
     $list = [];
     if ($command_id == 80) {
         foreach ($payload['members'] as $node) {
             $list[] = new OrientNode($node);
         }
         $this->_transport->setNodesList($list);
         # LIST WITH THE NEW CLUSTER CFG
     }
 }