public function __construct()
{
$basename = preg_replace('/^.+\\\\(\\w+)$/', '$1', get_class($this));
$this->name = \Scalr::decamelize($basename);
$this->pids = [];
$this->toDisconnect = [];
$this->setLogger(\Scalr::getContainer()->logger($this->name)->setLevel($this->config()->log_level));
//It is possible to redefine default payload class for the task
if (file_exists(__DIR__ . '/Payload/' . $basename . 'Payload.php')) {
$this->payloadClass = __NAMESPACE__ . '\\Payload\\' . $basename . 'Payload';
}
$container = \Scalr::getContainer();
$container->set('auditlogger.request', function () {
return $this;
});
}