private function IANA2PHP(int $type): int
    {
        $constantName = 'DNS_'.RecordTypeEnum::getName($type);
        if (!defined($constantName)) {
            throw new UnsupportedTypeException(sprintf('Record type "%d" is not a supported type.', $type));
        }

        $phpType = constant($constantName);

        if (!is_int($phpType)) {
            throw new \InvalidArgumentException(sprintf('Constant "%s" is not an integer.', $constantName));
        }

        return $phpType;
    }