From 39f6056e94499194a64bbf3ab1cb6e3c2c01fe90 Mon Sep 17 00:00:00 2001 From: hide_d Date: Thu, 29 Mar 2018 00:38:55 +0900 Subject: [PATCH] =?UTF-8?q?Scenario=EC=97=90=EC=84=9C=20event=EB=A5=BC=20?= =?UTF-8?q?=EC=B6=94=EA=B0=80=ED=95=A0=EB=95=8C=20json=5Fencode=EB=A5=BC?= =?UTF-8?q?=20=EB=B9=BC=EB=A8=B9=EC=9D=80=20=EC=A0=90=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- twe/sammo/Scenario.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/twe/sammo/Scenario.php b/twe/sammo/Scenario.php index a93bf5aa..af30c0fa 100644 --- a/twe/sammo/Scenario.php +++ b/twe/sammo/Scenario.php @@ -329,6 +329,13 @@ class Scenario{ $event->tryRunEvent($env); } + $events = array_map(function($rawEvent){ + return [ + 'cond'=>Json::encode($rawEvent['cond']), + 'action'=>Json::encode($rawEvent['action']) + ]; + }, $this->events); + $db->insert('event', $this->events); }