/** * Handler event parse offer * * @param Events\ParseOffer $event Data in event. */ public function packOffer(Events\ParseOffer $event) { $data = $event->getData(); $this->addLength($data['entityType'], $data); if ($this->packSize <= $this->len[$data['entityType']]) { $this->packData($data['entityType']); } }
/** * @param Events\ParseOffer $event */ public function parseOffers(Events\ParseOffer $event) { $data = $event->getData(); $this->buffer->set($data['entityType'], $this->json($data)); }