public static function factory($workerClass)
{
if (!class_exists($workerClass)) {
throw new Exception\WorkerException("Worker {$workerClass} is not exists");
}
$worker = new $workerClass();
if (!$worker instanceof AbstractWorker) {
throw new Exception\WorkerException("Worker {$workerClass} is not instanceof AbstractWorker");
}
return $worker;
}