소스 검색

Refactory device listener

Guillermo Espinoza 7 년 전
부모
커밋
3bb922f8aa
1개의 변경된 파일7개의 추가작업 그리고 3개의 파일을 삭제
  1. 7 3
      EventListener/DeviceListener.php

+ 7 - 3
EventListener/DeviceListener.php

@@ -97,12 +97,16 @@ class DeviceListener
         $application = new Application($kernel);
         $application->setAutoExit(false);
 
-        $input = new ArgvInput(array(
+        $args = [
+            '',
             'amqp:remote',
             $name,
-            '--args=' . implode(' --args=', $cmd_args),
             '--route=' . getenv("AMQP_KEY"),
-        ));
+        ];
+        foreach ($cmd_args as $cmd_arg) {
+            $args[] = '--args=' . $cmd_arg;
+        }
+        $input = new ArgvInput($args);
 
         $output = new BufferedOutput();