public function setPart($position, $value)
    {
        if (!$this->fieldFactory->getField($position)->validate($value)) {
            throw new InvalidArgumentException(
                'Invalid CRON field value ' . $value . ' as position ' . $position
            );
        }

        $this->cronParts[$position] = $value;

        return $this;
    }
public function setPart($position, $value)
    {
        if (!$this->fieldFactory->getField($position)->validate($value)) {
            throw new InvalidArgumentException(
                'Invalid CRON field value ' . $value . ' as position ' . $position
            );
        }

        $this->cronParts[$position] = $value;

        return $this;
    }
public function setPart ( $ position , $ value ) { if ( ! $ this -> fieldFactory -> getField ( $ position ) -> validate ( $ value ) ) { throw new InvalidArgumentException ( 'Invalid CRON field value ' . $ value . ' as position ' . $ position ) ; } $ this -> cronParts [ $ position ] = $ value ; return $ this ; }
Set part of the CRON expression

@param int    $position The position of the CRON expression to set
@param string $value    The value to set

@return CronExpression
@throws InvalidArgumentException if the value is not valid for the part
Set part of the CRON expression