src/Qutee/Worker.php
protected function _runTask(Task $task)
    {
        $taskClassName  = $task->getClassName();
        if (!class_exists($taskClassName)) {
            throw new \InvalidArgumentException(sprintf('Task class "%s" not found', $taskClassName));
        }

        $taskObject     = new $taskClassName;

        if ($taskObject instanceof TaskInterface) {

            $taskObject->setData($task->getData());
            $taskObject->run();
            return $taskObject;

        } else {

            $methodName     = $task->getMethodName();
            $taskObject->$methodName($task->getData());

        }
    }
protected function _runTask(Task $task)
    {
        $taskClassName  = $task->getClassName();
        if (!class_exists($taskClassName)) {
            throw new \InvalidArgumentException(sprintf('Task class "%s" not found', $taskClassName));
        }

        $taskObject     = new $taskClassName;

        if ($taskObject instanceof TaskInterface) {

            $taskObject->setData($task->getData());
            $taskObject->run();
            return $taskObject;

        } else {

            $methodName     = $task->getMethodName();
            $taskObject->$methodName($task->getData());

        }
    }
Get class of the task, run it's default method or method specified in
task data [method]

@param Task $task