Selaa lähdekoodia

Refactory device listener

Guillermo Espinoza 7 vuotta sitten
vanhempi
commit
3bb922f8aa
1 muutettua tiedostoa jossa 7 lisäystä ja 3 poistoa
  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();