/** * @param Screenplay[] $scenarios */ public function publish(array $scenarios) { $ids = []; foreach ($scenarios as $screenplay) { $ids[] = $screenplay->getId(); } $this->producer->publish(Json::encode($ids)); }
public function saveToImap($message, $folder, $connection = 'default') { $result = ['message' => $message, 'folder' => $folder, 'connection' => $connection]; $this->rabbitImap->publish(json_encode((object) $result)); }