protected function createCrontab()
    {
        $tasks = $this->formatTasks();
        $missions = array();
        foreach ($tasks as $task) {
            if ($task['out'] instanceof LoggerInterface) {
                $out = $task['out'];
            } else {
                $out = MissionLoggerFactory::create($task['out']);
            }
            if ($task['err'] instanceof LoggerInterface) {
                $err = $task['err'];
            } else {
                $err = MissionLoggerFactory::create($task['err']);
            }

            $mission = new Mission(
                $task['name'],
                $task['cmd'],
                $task['time'],
                $out,
                $err,
                $task['user'],
                $task['group']
            );
            $missions[] = $mission;
        }

        return new Crontab($this->logger, $missions);
    }
protected function createCrontab()
    {
        $tasks = $this->formatTasks();
        $missions = array();
        foreach ($tasks as $task) {
            if ($task['out'] instanceof LoggerInterface) {
                $out = $task['out'];
            } else {
                $out = MissionLoggerFactory::create($task['out']);
            }
            if ($task['err'] instanceof LoggerInterface) {
                $err = $task['err'];
            } else {
                $err = MissionLoggerFactory::create($task['err']);
            }

            $mission = new Mission(
                $task['name'],
                $task['cmd'],
                $task['time'],
                $out,
                $err,
                $task['user'],
                $task['group']
            );
            $missions[] = $mission;
        }

        return new Crontab($this->logger, $missions);
    }
protected function createCrontab ( ) { $ tasks = $ this -> formatTasks ( ) ; $ missions = array ( ) ; foreach ( $ tasks as $ task ) { if ( $ task [ 'out' ] instanceof LoggerInterface ) { $ out = $ task [ 'out' ] ; } else { $ out = MissionLoggerFactory :: create ( $ task [ 'out' ] ) ; } if ( $ task [ 'err' ] instanceof LoggerInterface ) { $ err = $ task [ 'err' ] ; } else { $ err = MissionLoggerFactory :: create ( $ task [ 'err' ] ) ; } $ mission = new Mission ( $ task [ 'name' ] , $ task [ 'cmd' ] , $ task [ 'time' ] , $ out , $ err , $ task [ 'user' ] , $ task [ 'group' ] ) ; $ missions [ ] = $ mission ; } return new Crontab ( $ this -> logger , $ missions ) ; }
create crontab object

@return Crontab
create crontab object