예제 #1
0
 public function __construct($module, $method, array $args = [], array $options = [])
 {
     $this->module = $module;
     $this->method = $method;
     if (isset($args['id'])) {
         $this->id = $args['id'];
         unset($args['id']);
     } else {
         $this->id = 1;
     }
     $this->params = $this->buildParams($args);
     parent::__construct($this->module . '.' . $this->method, $args, $options);
 }
예제 #2
0
 /**
  * @param Operation        $operation Operation associated with the command
  * @param array            $args      Arguments to pass to the command
  * @param EmitterInterface $emitter   Emitter used by the command
  */
 public function __construct(Operation $operation, array $args, EmitterInterface $emitter = null)
 {
     $this->operation = $operation;
     parent::__construct('', $args, $emitter);
 }