public function setJobName($name)
    {
        if (!is_string($name)) {
            throw new InvalidArgumentException('Job name must be a string');
        }

        $name = trim($name);
        $strlen = mb_strlen($name);

        if (!$strlen) {
            throw new InvalidArgumentException('Job name cannot be empty');
        } elseif ($strlen < 2 || $strlen > 255) {
            throw new InvalidArgumentException('Job name length must be in range 2-255 characters');
        }

        $this->jobName = $name;

        return $this;
    }
public function setJobName($name)
    {
        if (!is_string($name)) {
            throw new InvalidArgumentException('Job name must be a string');
        }

        $name = trim($name);
        $strlen = mb_strlen($name);

        if (!$strlen) {
            throw new InvalidArgumentException('Job name cannot be empty');
        } elseif ($strlen < 2 || $strlen > 255) {
            throw new InvalidArgumentException('Job name length must be in range 2-255 characters');
        }

        $this->jobName = $name;

        return $this;
    }
public function setJobName ( $ name ) { if ( ! is_string ( $ name ) ) { throw new InvalidArgumentException ( 'Job name must be a string' ) ; } $ name = trim ( $ name ) ; $ strlen = mb_strlen ( $ name ) ; if ( ! $ strlen ) { throw new InvalidArgumentException ( 'Job name cannot be empty' ) ; } elseif ( $ strlen < 2 || $ strlen > 255 ) { throw new InvalidArgumentException ( 'Job name length must be in range 2-255 characters' ) ; } $ this -> jobName = $ name ; return $ this ; }
Set job name

@param string $name

@return $this
Set job name