Sets the first numbers of the barcode.
- GS1_AUTO: Adds 978 before the code
- GS1_PREFIX978: Adds 978 before the code
- GS1_PREFIX979: Adds 979 before the code

@param int $gs1
189810
public function setGS1($gs1) {
        $gs1 = (int)$gs1;
        if ($gs1 !== self::GS1_AUTO && $gs1 !== self::GS1_PREFIX978 && $gs1 !== self::GS1_PREFIX979) {
            throw new CINArgumentException('The GS1 argument must be CINisbn::GS1_AUTO, CINisbn::GS1_PREFIX978, or CINisbn::GS1_PREFIX979', 'gs1');
        }

        $this->gs1 = $gs1;
    }
791583
protected function r1()
    {
        list($this->r1Index, $this->r1) = $this->rx($this->word);
    }
10243
public function setPrefix($prefix = null)
    {
        $prefix = trim($prefix, '/');

        $this->prefix = ($prefix) ? trim($prefix, '/') . '/' : '';
    }
260004
public void setFirst(int first) {

        if (first < 0) {
            throw new IllegalArgumentException(String.valueOf(first));
        }
        getStateHelper().put(PropertyKeys.first, first);

    }
357505
public function init($vars) {
		foreach($vars as $n => $v) {
			if($n == 'db') self::$db = $v;
			else if($n == 'error') self::$e = $v;
			else self::$add[$n] = $v;
		}
	}
802780
public function setNum($num)
    {
        $this->num = $num;
        foreach ($this->positions as $position) {
            $position->generated->line = $num;
        }
    }
825810
public function setCharset($charset)
    {
        parent::setCharset($charset);
        if (isset($this->paramEncoder)) {
            $this->paramEncoder->charsetChanged($charset);
        }
    }
718187
public function setStandards($standards)
    {
        $this->_standards = array();
        $token            = ' ,;';
        $standard         = strtok($standards, $token);

        while ($standard !== false) {
            $this->_standards[] = $standard;
            $standard           = strtok($token);
        }

    }
748063
public function setLabelPreference($s){
        if (is_string($s) && $s){
            if ($s == 'SELLER_LABEL' || $s == 'AMAZON_LABEL_ONLY' || $s == 'AMAZON_LABEL_PREFERRED'){
                $this->options['LabelPrepPreference'] = $s;
            } else {
                return false;
            }
        } else {
            return false;
        }
    }
1142614
public function setCharset($charset) {
		if (!$this->isOpen) return;
		$this->charset=$charset;
		$this->conn1->set_charset($this->charset);
	}
412256
public function setFirstName($firstName)
    {
        if (!empty($firstName) && is_string($firstName) && ctype_print($firstName)) {
            $this->firstName = trim($firstName);
        }

        return $this;
    }
1269155
public function setSeq2($b)
    {
        if (!is_array($b)) {
            $b = str_split($b);
        }
        if ($b == $this->b) {
            return;
        }

        $this->b = $b;
        $this->matchingBlocks = null;
        $this->opCodes = null;
        $this->fullBCount = null;
        $this->chainB();
    }
385599
protected function setRuleName($first = false)
    {
        if ($this->name) {
            $vars = $this->parseVar($this->rule);
            $name = strtolower($this->name);

            if (isset($this->option['ext'])) {
                $suffix = $this->option['ext'];
            } elseif ($this->parent->getOption('ext')) {
                $suffix = $this->parent->getOption('ext');
            } else {
                $suffix = null;
            }

            $value = [$this->rule, $vars, $this->parent->getDomain(), $suffix, $this->method];

            Zilf::$container->getShare('ruleName')->set($name, $value, $first);
        }

        if (!$this->hasSetRule) {
            Zilf::$container->getShare('ruleName')->setRule($this->rule, $this);
            $this->hasSetRule = true;
        }
    }
167268
public function setCursor($pos)
    {
        if ($pos < 1) {
            $this->cursor = 1;
        } else {
            if ($pos > $this->nbResults) {
                $this->cursor = $this->nbResults;
            } else {
                $this->cursor = $pos;
            }
        }
    }
1240179
public function setNumber($number)
    {
        $this->number = $number;
        $this->factors = $this->getFactors($this->getNumber());
    }
1320587
public function setDecimals(string $decimals)
    {
        if (empty($decimals)) {
            Throw new PasswordException('Decimals cannot be an empty string.');
        }

        $this->decimals = $decimals;
    }
60478
protected function _setTokenStart($delimiter)
    {
        if (!is_null($delimiter)) {
            $delimiter = $this->_normalizeTokenDelimiter($delimiter);
        }

        $this->tokenStart = $delimiter;
    }