Kohkimakimoto\Worker\Worker::__construct PHP Method

__construct() public method

Constructor.
public __construct ( array $config = [] )
$config array configuration parameters.
    public function __construct($config = array())
    {
        $this->masterPid = posix_getpid();
        $this->finished = false;
        // Registers fundamental instances.
        $this['config'] = new Config($config);
        $this["eventLoop"] = Factory::create();
        $this["output"] = new ConsoleOutput();
        $this['dispatcher'] = new EventDispatcher();
        if ($this->config->isDebug()) {
            $this->output->setVerbosity(OutputInterface::VERBOSITY_DEBUG);
        }
        // Registers default providers.
        $this->registerDefaultProviders();
    }