Check if a term type is valid.

@param string $type

@return bool
961338
public static function isValidType($type)
    {
        if ($type === '') {
            $result = true;
        } else {
            $valid = self::getTypesInfo();
            $result = isset($valid[$type]);
        }

        return $result;
    }
687101
public function hasExceptionOfType($type)
    {
        foreach ($this->_exceptions as $e) {
            if ($e instanceof $type) {
                return true;
            }
        }

        return false;
    }
674677
public static function isValidFieldType(string $type) : bool
    {
        try {
            $config = ConfigFactory::getByType($type, 'dummy_field');
        } catch (InvalidArgumentException $e) {
            return false;
        }

        return true;
    }
475375
public function isAssignableFrom(Type $type)
    {
        if (!$type instanceof ArrayType)
            return false;
        if (!$type->itemType->equals($this->itemType))
            return false;
        if (!$type->keyType->equals($this->keyType))
            return false;
        
        return true;
    }
279911
public static function validateType($type)
    {
        if (!in_array($type, [self::TYPE_INFO, self::TYPE_SUCCESS, self::TYPE_WARNING, self::TYPE_ERROR])) {
            throw new \InvalidArgumentException('Invalid resource message type "%s".', $type);
        }
    }
998677
public function removeAllowedMimeType($type)
    {
        $key = array_search($type, $this->allowedMimeTypes);
        if ($key !== false) {
            unset($this->allowedMimeTypes[$key]);
            return true;
        }


        return false;
    }
121216
public static function isValid($value)
    {
        if (!is_string($value)) {
            return false;
        }

        $type = self::getType($value);

        return !($type === null);
    }
166438
protected function checkThisIsSubsetOf(IType $type) : bool
    {
        if ($type instanceof MixedType) {
            return true;
        } elseif ($type instanceof UnionType) {
            if ( $type->hasUnionedType($this)) {
                return true;
            }

            foreach ($type->getTypes() as $type) {
                if ($this->isSubsetOf($type)) {
                    return true;
                }
            }

            return false;
        } elseif ($type instanceof NotType) {
            return !$type->getType()->isSubsetOf($this);
        } else {
            return false;
        }
    }
1153499
public function is_filetype_group($type) {

        $info = $this->get_groups_info();

        if (isset($info[$type])) {
            return $info[$type];

        } else {
            return false;
        }
    }
1226938
public function hasFlagsOfType($type)
    {
        if ($this->flags === null) {
            return false;
        }

        foreach ($this->flags as $flag) {
            if ($flag->type == $type) {
                return true;
            }
        }

        return false;
    }
328958
private function checkType($type)
    {
        $isInType = true;

        foreach ($this->getKeys() as $key) {
            if (gettype($key) !== $type) {
                $isInType = false;
                break;
            }
        }

        return $isInType;
    }
219919
public static function isString($type): bool
    {
        return (
            \is_int($type) &&
            $type >= self::TYPE_STRING &&
            $type <= self::TYPE_VARCHAR
        );
    }
126425
protected function validateTypeNameWording($type)
    {
        if (!isset(self::$wording[$type])) {
            throw new StandardUnexpectedValueException(
                sprintf(
                    'No wording for %s available, expected wordings are: [%s]',
                    var_export($type, true),
                    implode(', ', array_filter(self::$wording)))
            );
        }
    }
1205523
public function contains($type) {
	    foreach ($this as $child) {
	        if ($child->getType() == $type || $child->contains($type)) {
	            return true;
	        }
	    }
	    return false;
	}
1161905
protected function classMetadataExists($type)
    {
        $className = $this->getClassNameForType($type);
        try {
            $metadata = $this->mf->getMetadataFor($className);
            return true;
        } catch (MappingException $e) {
            return false;
        }
        return false === $this->shouldFilterClassMetadata($metadata);
    }
271903
private function isInheritanceType($type)
    {
        return $type === InheritanceType::NONE
            || $type === InheritanceType::SINGLE_TABLE
            || $type === InheritanceType::JOINED
            || $type === InheritanceType::TABLE_PER_CLASS;
    }
813861
private function is_text_col( $type ) {
		foreach ( array( 'text', 'varchar' ) as $token ) {
			if ( false !== strpos( $type, $token ) ) {
				return true;
			}
		}

		return false;
	}