public function createTask(JobInterface $job)
    {
        $className = $job->getTaskClassName();
        $task = new $className($this, $job->getParams());

        if (!$task instanceof TaskAbstract) {
            throw new \InvalidArgumentException('Task must be an instance of "Extlib\Cron\Task\TaskAbstract", given "%s".', get_class($task));
        }
        
        return $task;
    }
public function createTask(JobInterface $job)
    {
        $className = $job->getTaskClassName();
        $task = new $className($this, $job->getParams());

        if (!$task instanceof TaskAbstract) {
            throw new \InvalidArgumentException('Task must be an instance of "Extlib\Cron\Task\TaskAbstract", given "%s".', get_class($task));
        }
        
        return $task;
    }
public function createTask ( JobInterface $ job ) { $ className = $ job -> getTaskClassName ( ) ; $ task = new $ className ( $ this , $ job -> getParams ( ) ) ; if ( ! $ task instanceof TaskAbstract ) { throw new \ InvalidArgumentException ( 'Task must be an instance of "Extlib\Cron\Task\TaskAbstract", given "%s".' , get_class ( $ task ) ) ; } return $ task ; }
Create task class from cron job

@param \Extlib\Cron\Adapter\Job\JobInterface $job
@return \Extlib\Cron\Task\TaskAbstract
@throws \InvalidArgumentException
Create task class from cron job