PhpOrient\Protocols\Binary\Abstracts\Operation::_pushReceived PHP Method

_pushReceived() protected method

Default callback for received push Notices
protected _pushReceived ( $command_id, $payload )
$command_id
$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
        }
    }