Return the integer value of an RDATA type. E.g. getTypeFromName('MX') returns 15.

@param string $name The name of the record type, e.g. = 'A' or 'MX' or 'SOA'

@return int

@throws \InvalidArgumentException
517151
public static function getTypeFromName(string $name): int
    {
        $type = array_search(strtoupper(trim($name)), self::$names);
        if (false === $type || !is_int($type)) {
            throw new \InvalidArgumentException(sprintf('RData type "%s" is not defined.', $name));
        }

        return $type;
    }
698091
public function staticArrayLength($name)
    {
        $nestedTypes = $this->nestedTypes($name);

        if ($nestedTypes === false) {
            return 1;
        }
        $match = [];

        if (preg_match('/[0-9]{1,}/', $nestedTypes[count($nestedTypes) - 1], $match) === 1) {
            return (int) $match[0];
        }
        return 1;
    }
122596
private function getAttributeIndex(string $name): ?int
    {
        $index = $this->ruleMainIndexes[$name] ?? null;

        return $index;
    }
1374534
public function getProperty($name)
    {
        $propertiesNames = [
            "divisibility"  => 0,
            "initialSupply" => 1,
            "supplyMutable" => 2,
            "transferable"  => 3,
        ];

        if (! array_key_exists($name, $propertiesNames)) {
            throw new InvalidArgumentException("Mosaic property name '" . $name ."' is invalid. Must be one of 'divisibility', "
                                             . "'initialSupply', 'supplyMutable' or 'transferable'.");
        }

        // sort properties lexicographically (see toDTO() overload)
        $sorted = $this->sortBy("name");
        $index = $propertiesNames[$name];
        $prop  = $sorted->get($index);

        if ($prop instanceof MosaicProperty) {
            return $prop->value;
        }

        return $prop["value"];
    }
1137864
public function getType($name)
    {
        if (isset($this->types[$name])) {
            return $this->types[$name];
        }

        throw new SourceTypeException(sprintf('Mapper source type %s not found!', $name));
    }
567909
public function getInt($name, $default = null)
    {
        $value = $this->get($name, $default);
        return null === $value ? null : intval($value);
    }
325237
public function getByName(string $name): Conversion
    {
        $conversion = $this->first(function (Conversion $conversion) use ($name) {
            return $conversion->getName() === $name;
        });

        if (! $conversion) {
            throw InvalidConversion::unknownName($name);
        }

        return $conversion;
    }
240789
public function getData($name = null)
    {
        if (is_null($name)) {
            return $this->data;
        } elseif (array_key_exists($name, $this->data)) {
            return $this->data[$name];
        } elseif (array_key_exists($name, $this->relation)) {
            return $this->relation[$name];
        } else {
            throw new InvalidArgumentException('property not exists:' . static::class . '->' . $name);
        }
    }
1368945
public function get($name)
    {
        if (!isset($this->storages[$name])) {
            throw new InvalidArgumentException("Storage $name not found.");
        }

        return $this->storages[$name];
    }
524488
public function getFileParameter($name)
    {
        if (!$this->hasFileParameter($name)) {
            throw new \InvalidArgumentException(sprintf('The file request parameter "%s" does not exist.', $name));
        }

        return $this->fileParameters[$name];
    }
480107
public function getParameter(string $name): string
    {
        if (!isset($this->values[$name])) {
            throw new \InvalidArgumentException("Invalid route parameter '$name'");
        }

        return $this->values[$name];
    }
307671
public function getColumnNumber($name)
    {
        $name = trim($name);
        if (array_key_exists($name, $this->lookup)) {
            return $this->lookup[$name];
        }
        if ($this->throwException) {
            throw new \RuntimeException("name '$name' not found");
        }
        return -1;
    }
1075763
public function getIntValue($name):?int
    {
        $value = $this->offsetGet($name);
        if (is_null($value)) {
            return null;
        }

        return (int)$value;
    }
1102361
public static function getParam($name)
    {
        if ($param = static::getCont()->hasParameter($name)) {
            return static::getCont()->getParameter($name);
        }

        if (strpos($name, '.') !== false) {
            $parts = explode('.', $name, 2);
            $data = static::getCont()->getParameter($parts[0]);
            $data = UtilArray::cascadeGet($data, $parts[1]);
            if ($data) {
                return $data;
            }
        }

        return static::getCont()->getParameter($name);
    }
1332566
private function getDataType($name)
    {
        if (!$this->type) {
            $this->type = $this->optionRegistry->getDataType($name);
        }

        return $this->type;
    }
190800
public function attrIndex($name)
    {
        if (!isset($this->attrs)) { return -1; }

        for ($i = 0, $len = count($this->attrs); $i < $len; $i++) {
            if ($this->attrs[$i][0] === $name) { return $i; }
        }
        return -1;
    }
548779
public function inferDatatype($name) {
		foreach($this->config()->infer_datatype as $match => $type) {
			if(strstr($name, $match) !== false) {
				return $type;
			}
		}

		return $this->config()->default_datatype;
	}