Get the zero based index corresponding to the spreadsheet column (A, B, ..., Z, AA, AB, ...).

@param string $name Name of the column, case insensitive.

@return int|number zero based index that corresponds to the `$name`
431124
public static function SC($name)
    {
        // name consists of a single letter
        if (!preg_match("/^[A-Z]+$/i", $name)) {
            throw new \RuntimeException("invalid column name '$name'");
        }

        // solve longer names recursively
        if (preg_match("/^([A-Z])([A-Z]+)$/i", $name, $matches)) {
            return pow(26, strlen($matches[2])) * (self::SC($matches[1]) + 1) + self::SC($matches[2]);
        }

        return ord(strtoupper($name)) - 64 - 1;
    }
1091337
public function getColumn($name)
    {
        return isset($this->columns[$name]) ? $this->columns[$name] : false;
    }
357076
protected static function getAlgorithm($name)
    {
        if (!isset(self::$algorithms[$name])) {
            self::$algorithms[$name] = new $name();
        }

        return self::$algorithms[$name];
    }
1151084
public function getColumn($name)
    {
        foreach ($this->getColumns() as $column) {
            if ($column->getName() === $name) {
                return $column;
            }
        }

    }
1066001
public function getIndex($name)
    {
        if (!$this->hasIndex($name)) {
            throw SchemaException::tableIndexDoesNotExist($this->getName(), $name);
        }

        return $this->indexes[$name];
    }
255009
public static function getConstantByName($name)
    {
        switch (strtolower($name)) {
            case 'default':
                return self::DEF;
            break;

            case 'rect':
                return self::RECT;
            break;

            case 'circle':
                return self::CIRCLE;
            break;

            case 'poly':
                return self::POLY;
            break;

            case 'ellipse':
                return self::ELLIPSE;
            break;

            default:
                return false;
            break;
        }
    }
951537
public function getLookup($name)
    {
        $name = strtolower($name);

        return (array_key_exists($name, $this->lookup)) ? $this->lookup[$name] : false;
    }
148332
public static function getTreeColumn($name = null)
    {
        if (empty($name)) {
            return static::$treeColumns;
        } elseif (!empty(static::$treeColumns[$name])) {
            return static::$treeColumns[$name];
        }
        throw new \Exception('Tree column: ' . $name . ' undefined');
    }
307378
public static function getValue(string $name)
    {
        $enumerables = self::getCache();

        if (!array_key_exists($name, $enumerables)) {
            throw EnumerableException::nameInvalid($name);
        }

        return $enumerables[$name];
    }
1316873
public function staticPartLength($name)
    {
        $nestedTypes = $this->nestedTypes($name);

        if ($nestedTypes === false) {
            $nestedTypes = ['[1]'];
        }
        $count = 32;

        foreach ($nestedTypes as $type) {
            $num = mb_substr($type, 1, 1);

            if (!is_numeric($num)) {
                $num = 1;
            } else {
                $num = intval($num);
            }
            $count *= $num;
        }

        return $count;
    }
1156898
private function getAnnotationIndex($name)
    {
        for($i = 0; $i < count($this->annotations); $i++)
        {
            if($this->annotations[$i] instanceof $name)
            {
                return $i;
            }
        }

        return -1;
    }
1189559
public function getValue($name) {
    // return pk values as they are parts of the oid
    $mapper = ObjectFactory::getInstance('persistenceFacade')->getMapper($this->getType());
    $pkNames = $mapper->getPkNames();
    for ($i=0, $count=sizeof($pkNames); $i<$count; $i++) {
      if ($name == $pkNames[$i]) {
        $ids = $this->oid->getId();
        return $ids[$i];
      }
    }
    return $this->__call(__FUNCTION__, [$name]);
  }
1260507
public function getIndexByName($name)
    {
        return isset($this->indexes[$name]) ? $this->indexes[$name] : null;
    }
1268482
public function nameGetNextName($name) {
    $parentName = $this->parents[$name];
    if (!isset($parentName)) {
      $siblingNames = $this->toplevelNames;
      $siblingMap = $this->toplevelMap;
    }
    else {
      $siblingNames = $this->childNames[$parentName];
      $siblingMap = $this->childMap[$parentName];
    }
    $index = $siblingMap[$name];
    return isset($siblingNames[$index + 1])
      ? $siblingNames[$index + 1]
      : null;
  }
357638
public function getFacetCount($name)
	{
		$count = $this->resultset->getFacetSet()->getFacet($name)->getValue();
		return $count;
	}
875082
public int getLayerIndex(String name) {
		int idx = 0;

		for (int i = 0; i < layers.size(); i++) {
			Layer layer = (Layer) layers.get(i);

			if (layer.name.equals(name)) {
				return i;
			}
		}

		return -1;
	}
330988
public function index(string $name = ''): array
    {
        //获取原始索引信息
        $indexes = $this->getIndex($name);
        $ret = [];

        //逐个处理
        foreach ($indexes as $index) {
            //索引名称
            $name = $index['Key_name'];

            //列名
            $col = $index['Column_name'];

            //列信息
            $columnInfo = [
                'name' => $col,
                'null' => $index['Null'] ? true : false,//列中是否含有NULL
                'subPart' => $index['Sub_part'],//如果列只是被部分地编入索引，则为被编入索引的字符的数目。如果整列被编入索引，则为NULL
            ];

            //索引中的第一列,则创建
            if ($index['Seq_in_index'] == 1) {
                $ret[$name] = [
                    'tableName' => $index['Table'], //所属表名
                    'isUnique' => !$index['Non_unique'], //是否唯一索引
                    'collation' => $index['Collation'], //这个有A和NULL, A是不区分大小写?
                    'columns' => [$col => $columnInfo],//本索引中包含的列
                    'cardinality' => $index['Cardinality'], //索引中唯一值的数目的估计值。
                    'packed' => $index['Packed'],//指示关键字如何被压缩。如果没有被压缩，则为NULL。
                    'type' => $index['Index_type'],//用过的索引方法（BTREE, FULLTEXT, HASH, RTREE）。
                    'comment' => $index['Comment'],//说明
                ];
            } else {
                //索引中的后继列,则只增加列信息
                $ret[$name]['columns'][$col] = $columnInfo;
            }
        }

        return $ret;
    }