public function create($name, $jobId, $settings, $period)
    {
        $task = new Task();
        $task->setName($name)
            ->setJobId($jobId)
            ->setSettings($settings)
            ->setPeriod($period);

        $this->om->persist($task);
        $this->om->flush();

        $this->notify(NotifierInterface::MESSAGE_CREATE);

        return $task;
    }
public function create($name, $jobId, $settings, $period)
    {
        $task = new Task();
        $task->setName($name)
            ->setJobId($jobId)
            ->setSettings($settings)
            ->setPeriod($period);

        $this->om->persist($task);
        $this->om->flush();

        $this->notify(NotifierInterface::MESSAGE_CREATE);

        return $task;
    }
public function create ( $ name , $ jobId , $ settings , $ period ) { $ task = new Task ( ) ; $ task -> setName ( $ name ) -> setJobId ( $ jobId ) -> setSettings ( $ settings ) -> setPeriod ( $ period ) ; $ this -> om -> persist ( $ task ) ; $ this -> om -> flush ( ) ; $ this -> notify ( NotifierInterface :: MESSAGE_CREATE ) ; return $ task ; }
Creates a Task.

@param string  $name
@param string  $jobId
@param string  $settings
@param integer $period

@return Task
Creates a Task .