Increment the current string

@see self::decrypt()
@see self::encrypt()
@param string $var
@access private
488906
function _increment_str(&$var)
    {
        for ($i = 4; $i <= strlen($var); $i+= 4) {
            $temp = substr($var, -$i, 4);
            switch ($temp) {
                case "\xFF\xFF\xFF\xFF":
                    $var = substr_replace($var, "\x00\x00\x00\x00", -$i, 4);
                    break;
                case "\x7F\xFF\xFF\xFF":
                    $var = substr_replace($var, "\x80\x00\x00\x00", -$i, 4);
                    return;
                default:
                    $temp = unpack('Nnum', $temp);
                    $var = substr_replace($var, pack('N', $temp['num'] + 1), -$i, 4);
                    return;
            }
        }

        $remainder = strlen($var) % 4;

        if ($remainder == 0) {
            return;
        }

        $temp = unpack('Nnum', str_pad(substr($var, 0, $remainder), 4, "\0", STR_PAD_LEFT));
        $temp = substr(pack('N', $temp['num'] + 1), -$remainder);
        $var = substr_replace($var, $temp, 0, $remainder);
    }
756799
public function setValues($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
        $this->values = $arr;

        return $this;
    }
334185
public function setPurpose($var)
    {
        GPBUtil::checkEnum($var, \Google\Cloud\Kms\V1\CryptoKey_CryptoKeyPurpose::class);
        $this->purpose = $var;

        return $this;
    }
1278223
public function &push($var) {
    if (is_object($var) && in_array('Iterator', class_implements($var))) {
      return $this->append($var);
    }
    else {
      return $this->append(new \ArrayIterator(func_get_args()));
    }
  }
620158
public function decrement($key, $value = 1)
    {
        return $this->incrementOrDecrement($key, $value, function ($current, $value) {
            return $current - $value;
        });
    }
1079163
private function boolToString($var)
    {
        $copy = is_array($var) ? $var : [$var];

        foreach ($copy as $key => $value) {
            if (is_bool($value)) {
                $copy[$key] = $value ? '1' : '0';
            }
        }

        return is_array($var) ? $copy : $copy[0];
    }
614009
public function setUnwrapped($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\Dlp\V2\UnwrappedCryptoKey::class);
        $this->writeOneof(2, $var);

        return $this;
    }
954378
public function setView($var)
    {
        GPBUtil::checkEnum($var, \Google\Cloud\Kms\V1\CryptoKeyVersion_CryptoKeyVersionView::class);
        $this->view = $var;

        return $this;
    }
83498
public function decrement($key, $value = 1, $expiration = 0)
    {
        $new = intval($this->get($key));
        $new -= $value;
        $this->set($key, $new, $expiration);
    }
796991
public function setKeyRings($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Kms\V1\KeyRing::class);
        $this->key_rings = $arr;

        return $this;
    }
591839
public function setPrevKvs(&$var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Mvccpb\KeyValue::class);
        $this->prev_kvs = $arr;
    }
747901
public static function set($var, $value) {
        //  	var_dump($var." ".$value);
        Session::init(true);
        if (!Session::check_checksum()) return false;
        $_SESSION[$var] = $value;
        $_SESSION[__SESSION_checksum_var] = Session::make_checksum();
        return $value;
    }
673487
public function setVersionView($var)
    {
        GPBUtil::checkEnum($var, \Google\Cloud\Kms\V1\CryptoKeyVersion_CryptoKeyVersionView::class);
        $this->version_view = $var;

        return $this;
    }
1240995
protected function _removeSubcontent($var)
    {
        if ($this->acceptSubcontent($var)) {
            foreach ($this->_data[$var] as $type => $value) {
                if (is_array($value)) {
                    $keys = array_keys($value);
                    $values = array_values($value);

                    $type = end($keys);
                    $value = end($values);
                }

                foreach ($this->_subcontent as $subcontent) {
                    if ($subcontent->getUid() === $value) {
                        $this->_subcontent->removeElement($subcontent);
                        break;
                    }
                }
            }

            $this->updateSubcontentMap();
        }
    }
851837
public function setInputType($var)
    {
        GPBUtil::checkString($var, True);
        $this->input_type = $var;
        $this->has_input_type = true;

        return $this;
    }
299374
public function increment($key, $value = 1)
    {
        $this->store->increment($this->taggedItemKey($key), $value);
    }
731479
public function setCode($var)
    {
        GPBUtil::checkEnum($var, \Google\Cloud\Spanner\V1\TypeCode::class);
        $this->code = $var;

        return $this;
    }