CronExpression.php
private function getField($position, $value)
    {
        switch ($position) {
            case 0:
                return new MinuteField($value);
            case 1:
                return new HourField($value);
            case 2:
                return new DayOfMonthField($value);
            case 3:
                return new MonthField($value);
            case 4:
                return new DayOfWeekField($value);
            case 5:
                return new YearField($value);
            default:
                throw new \InvalidArgumentException(sprintf('%s is not a valid CRON expression position.', $position));
        }
    }
private function getField($position, $value)
    {
        switch ($position) {
            case 0:
                return new MinuteField($value);
            case 1:
                return new HourField($value);
            case 2:
                return new DayOfMonthField($value);
            case 3:
                return new MonthField($value);
            case 4:
                return new DayOfWeekField($value);
            case 5:
                return new YearField($value);
            default:
                throw new \InvalidArgumentException(sprintf('%s is not a valid CRON expression position.', $position));
        }
    }
private function getField ( $ position , $ value ) { switch ( $ position ) { case 0 : return new MinuteField ( $ value ) ; case 1 : return new HourField ( $ value ) ; case 2 : return new DayOfMonthField ( $ value ) ; case 3 : return new MonthField ( $ value ) ; case 4 : return new DayOfWeekField ( $ value ) ; case 5 : return new YearField ( $ value ) ; default : throw new \ InvalidArgumentException ( sprintf ( '%s is not a valid CRON expression position.' , $ position ) ) ; } }
Get the field object for the given position with the given value.

@param string $position
@param string $value

@return FieldInterface
@throws \InvalidArgumentException
Get the field object for the given position with the given value .