/** * Create a new Message from this instance. * * @return Message */ public function toMessage() { $m = new Message(); /* @var $w Worker */ foreach ($this->workerStatus as $w) { $m->push($w['id']); $m->push(count($w['actionList'])); $m->append($w['actionList']); $m->push($w['current']); $m->push($w['ready']); $m->push($w['valid']); } return $m; }
/** * Create a new Message from this StorageStatus. * * @return Message */ public function toMessage() { $m = new Message(array($this->getRequestId(), $this->getActionName())); $m->append($this->getParameters()); return $m; }
/** * Create a new Message from this FetchActions. * * @return \AlphaRPC\Common\Socket\Message */ public function toMessage() { $msg = new Message(array($this->requestId, $this->action)); $msg->append($this->params); return $msg; }