public function setEncoding(int $enc_type)
    {
        static $enc_type_list;
        if (null === $enc_type_list) {
            $enc_type_list = [
                self::RFC1738_ENCODING => 1,
                self::RFC3986_ENCODING => 1,
                self::RFC3987_ENCODING => 1,
                self::NO_ENCODING => 1,
            ];
        }

        if (!isset($enc_type_list[$enc_type])) {
            throw new InvalidArgumentException(sprintf('Unsupported or Unknown Encoding: %s', $enc_type));
        }

        $this->enc_type = $enc_type;
    }
public function setEncoding(int $enc_type)
    {
        static $enc_type_list;
        if (null === $enc_type_list) {
            $enc_type_list = [
                self::RFC1738_ENCODING => 1,
                self::RFC3986_ENCODING => 1,
                self::RFC3987_ENCODING => 1,
                self::NO_ENCODING => 1,
            ];
        }

        if (!isset($enc_type_list[$enc_type])) {
            throw new InvalidArgumentException(sprintf('Unsupported or Unknown Encoding: %s', $enc_type));
        }

        $this->enc_type = $enc_type;
    }
public function setEncoding ( int $ enc_type ) { static $ enc_type_list ; if ( null === $ enc_type_list ) { $ enc_type_list = [ self :: RFC1738_ENCODING => 1 , self :: RFC3986_ENCODING => 1 , self :: RFC3987_ENCODING => 1 , self :: NO_ENCODING => 1 , ] ; } if ( ! isset ( $ enc_type_list [ $ enc_type ] ) ) { throw new InvalidArgumentException ( sprintf ( 'Unsupported or Unknown Encoding: %s' , $ enc_type ) ) ; } $ this -> enc_type = $ enc_type ; }
Formatting encoding type

@param int $enc_type a predefined constant value
Formatting encoding type