Return the atomic (xs defined simple type) type associated with a passed in type

@param string|QName|array $type
3818
public function getAtomicType( $type )
	{
		if ( $type instanceof QName )
		{
			$type = "{$type->prefix}:{$type->localName}";
		}
		else if ( is_array( $type ) && isset( $type['prefix'] ) && isset( $type['prefix'] ) )
		{
			$type = "{$type['prefix']}:{$type['name']}";
		}
		else if ( ! is_string( $type ) ) return false;

		// If its not then look to see if there are ancestral types
		// BMS 2018-04-09 Test candidates changed.
		if ( $type == "xs:anyType" ) return "xs:anyType";

		// If its not then look to see if there are ancestral types
		// BMS 2018-04-09 Test candidates changed.
		if ( $type == "xs:anyComplexType" ) return false;

		// anyAtomicType is an alias for anySimpleType
		// BMS 2018-04-09 Test candidates changed.
		if ( $type == "xs:anyAtomicType" )
		{
			$type = "xs:anySimpleType";
		}
		// Is the $type already in $xsTypes
		if ( isset( SchemaTypes::$xsTypes[ $type ] ) )
		{
			return $type;
		}

		if ( ! isset( $this->types[ $type ] ) ) return false;

		$t = $this->types[ $type ];
		if ( isset( $t['parent'] ) )
		{
			// There are so repeat the test with the ancestor element
			return $this->getAtomicType( $t['parent'] );
		}
		// else if ( isset( $t['types'] ) )
		// {
		// 	// It may be necessary to consider types if $t is defined as a union such as xbrli:dateTimeItemType
		// 	foreach ( $t['types'] as $parentType )
		// 	{
		// 		$result = $this->getAtomicType( $parentType );
		// 		if ( $result )
		// 		{
		// 			return $t;
		// 		}
		// 	}
		// }
		else
		{
		}

		return false;
	}
726924
public function type($type = null)
    {
        if ($type !== null) {
            $this->type = $type;
            return $this;
        }
        return $this->type;
    }
1081222
private static function check_type($type=null) {
	if (is_null($type)) {
		return self::TYPE_CONTINUOUS;
	}
	
	if (isset(self::$type_durations[$type]) == false) {
		$exception = bootstrap::get_library('exception');
		throw new $exception('unknown session type');
	}
	
	return $type;
}
883757
protected function getGraphQLType(?string $type):?string
    {
        switch ($type) {
            case DoctrineType::BOOLEAN:
                $type = Types::BOOLEAN;
                break;
            case DoctrineType::DECIMAL:
            case DoctrineType::FLOAT:
                $type = Types::FLOAT;
                break;
            case DoctrineType::INTEGER:
            case DoctrineType::BIGINT:
            case DoctrineType::SMALLINT:
                $type = Types::INT;
                break;
            case DoctrineType::STRING:
            case DoctrineType::TEXT:
            case DoctrineType::GUID:
                $type = Types::STRING;
                break;
            case DoctrineType::TARRAY:
            case DoctrineType::SIMPLE_ARRAY:
            case DoctrineType::JSON_ARRAY:
                $type = Types::nonNull(Types::listOf(Types::STRING));
                break;
            case DoctrineType::TIME:
            case DoctrineType::TIME_IMMUTABLE:
                $type = Types::TIME;
                break;
            case DoctrineType::DATE:
                $type = Types::DATE;
                break;
            case DoctrineType::DATETIME:
                $type = Types::DATETIME;
                break;
        }

        return $type;
    }
1186831
public function setType($type = null)
    {
        if (is_array($type)) {
            $detected = 0;
            foreach ($type as $value) {
                if (is_int($value)) {
                    $detected += $value;
                } elseif (in_array($value, $this->constants)) {
                    $detected += array_search($value, $this->constants);
                }
            }

            $type = $detected;
        } elseif (is_string($type) && in_array($type, $this->constants)) {
            $type = array_search($type, $this->constants);
        }

        if (!is_int($type) || ($type < 0) || ($type > self::TYPE_ALL)) {
            throw new Exception\InvalidArgumentException(sprintf(
                'Unknown type value "%s" (%s)',
                $type,
                gettype($type)
            ));
        }

        $this->options['type'] = $type;
        return $this;
    }
1257531
private static function getTyped($type)
    {
        if (!isset(static::$types[$type])) {
            static::$types[$type] = new self($type);
        }

        return static::$types[$type];
    }
341438
protected function setType($type)
    {
        return Match::on($type)
            ->string(function ($type) {
                $this->type = $type;
                return FTry::with($type);
            })
            ->any(function () {
                return FTry::with(function () {
                    return new \RuntimeException('Type must be specified by string');
                });
            })
            ->value();
    }
1070472
private function getTypeFamily($type) {
		if (is_array($type)) {
			$r=[];
			foreach($type as $key=>$t) {
				$r[$key]=$this->getTypeFamily($t);
			}
		} else {
			switch (1 == 1) {
				case (strpos($this->STRARR, $type) !== false):
					$r = 1; // string
					break;
				case (strpos($this->DATARR, $type) !== false):
					$r = 2; // date
					break;
				case ($type == 'boolean'):
					$r = 3; // boolean
					break;
				case ($type == 'file'):
					$r = 4; // file
					break;
				default:
					$r = 0; // number
			}
		}
		return $r;
	}
1098994
public function compile($type = 'select')
    {

        // Raw Type
        if ($this->rawQuery) {
            // Bind value
            $this->bindValue();

            return $this->queryString;
        }

        $this->queryString = '';

        if ($type == 'select') {
            $this->compileSelect();
            $this->compileFrom();
            $this->compileJoin();
            $this->compileWhere();
            $this->compileGroupBy();
            $this->compileOrderBy();
            $this->compileOffset();
        } elseif ($type == 'count') {
            $this->compileCount();
            $this->compileFrom();
            $this->compileJoin();
            $this->compileWhere();
            $this->compileGroupBy();
        } elseif ($type == 'insert') {
            $this->compileInsert();
        } elseif ($type == 'update') {
            $this->compileUpdate();
            $this->compileJoin();
            $this->compileWhere();
        } elseif ($type == 'delete') {
            $this->compileDelete();
            $this->compileFrom();
            $this->compileJoin();
            $this->compileWhere();
            $this->compileGroupBy();
        }

        // Bind value
        $this->bindValue();

        return $this->queryString;
    }
937685
public function getBlocksByType($type)
    {
        $blocks = [];

        foreach ($this->getBlocks() as $block) {
            if ($type === $block->getType()) {
                $blocks[] = $block;
            }
        }

        return $blocks;
    }
44470
private static function getFromCache($type)
    {
        if (!isset(self::$cache[$type])) {
            return;
        }

        $candidate = self::$cache[$type];
        if (isset($candidate['condition'])) {
            if (!self::evaluateCondition($candidate['condition'])) {
                return;
            }
        }

        return $candidate['class'];
    }
628584
public function fetch($type = 'num')
    {
        $row = parent::fetch($type);
        if ($type == 'assoc' && is_array($row) && !empty($this->_driver->autoShortenedIdentifiers)) {
            //Need to preserve order of row results
            $translatedRow = [];
            foreach ($row as $key => $val) {
                if (array_key_exists($key, $this->_driver->autoShortenedIdentifiers)) {
                    $translatedRow[$this->_driver->autoShortenedIdentifiers[$key]] = $val;
                } else {
                    $translatedRow[$key] = $val;
                }
            }
            $row = $translatedRow;
        }
        return $row;
    }
15428
protected function typeToPDOParamType($type)
    {
        switch ($type) {
        case "boolean":
            return PDO::PARAM_BOOL;
        case "integer":
            return PDO::PARAM_STR;
        case "NULL":
            return PDO::PARAM_NULL;
        case "resource":
            return PDO::PARAM_LOB;
        case "double":
        case "string":
        default:
            return PDO::PARAM_STR;
        }
    }
331464
static function getArrayType($type){
        self::isArray($type) or \PhpBoot\abort(new \InvalidArgumentException("$type is not array"));
        if($type == 'array') {
            return 'mixed';
        }else{
            return substr($type,0,-2);
        }
    }
105260
protected function getBuilderForType(string $type): Builder
    {
        if (null === $this->builder_factory) {
            throw UnresolvableBuilderException::forType($type);
        }

        return $this->builder_factory->buildForType($type);
    }
99449
public function get($type)
    {
        if (!isset($this->instances[$type])) {

            if (!isset($this->services[$type])) {
                if ($this->debug) {
                    trigger_error(sprintf("Widget type '%s' does not exist, returning a null implementation", $type), E_USER_ERROR);
                }
                // This primarily meant to display stuff, we should never WSOD
                // in the user's face, return a null object instead that will
                // UI operations smooth and error tolerant.
                return new NullWidget();
            }

            $this->instances[$type] = $this->container->get($this->services[$type]);
        }

        return $this->instances[$type];
    }
262975
public function getXMLDBKeyType($type) {

        $result = XMLDB_KEY_INCORRECT;

        switch (strtolower($type)) {
            case 'primary':
                $result = XMLDB_KEY_PRIMARY;
                break;
            case 'unique':
                $result = XMLDB_KEY_UNIQUE;
                break;
            case 'foreign':
                $result = XMLDB_KEY_FOREIGN;
                break;
            case 'foreign-unique':
                $result = XMLDB_KEY_FOREIGN_UNIQUE;
                break;
            // case 'check':  //Not supported
            //     $result = XMLDB_KEY_CHECK;
            //     break;
        }
        // Return the normalized XMLDB_KEY
        return $result;
    }