Explorar o código

Refactory device listener

Guillermo Espinoza %!s(int64=7) %!d(string=hai) anos
pai
achega
3bb922f8aa
Modificáronse 1 ficheiros con 7 adicións e 3 borrados
  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();