__construct() 공개 메소드

Creates a new console application.
public __construct ( ApplicationConfig | callable $config )
$config Webmozart\Console\Api\Config\ApplicationConfig | callable The application configuration or a callable that creates the configuration.
예제 #1
0
 /**
  * ConsoleApplication constructor.
  *
  * @param callable|ApplicationConfig $config
  * @param CommandBus                 $commandBus
  * @param EventBus                   $eventBus
  */
 public function __construct($config, CommandBus $commandBus, EventBus $eventBus)
 {
     $this->commandBus = $commandBus;
     $this->eventBus = $eventBus;
     $this->defaultHandler = new DefaultEventHandler();
     $this->commandConverter = new ConsoleArgsToCommand();
     parent::__construct($this->normalizeConfig($config));
 }