Return node-type as human readable string (constant name)

@param null $nodeType

@return string
181131
public function getNodeTypeName($nodeType = null)
    {
        $strings = array(
            XMLReader::NONE                   => 'NONE',
            XMLReader::ELEMENT                => 'ELEMENT',
            XMLReader::ATTRIBUTE              => 'ATTRIBUTE',
            XMLREADER::TEXT                   => 'TEXT',
            XMLREADER::CDATA                  => 'CDATA',
            XMLReader::ENTITY_REF             => 'ENTITY_REF',
            XMLReader::ENTITY                 => 'ENTITY',
            XMLReader::PI                     => 'PI',
            XMLReader::COMMENT                => 'COMMENT',
            XMLReader::DOC                    => 'DOC',
            XMLReader::DOC_TYPE               => 'DOC_TYPE',
            XMLReader::DOC_FRAGMENT           => 'DOC_FRAGMENT',
            XMLReader::NOTATION               => 'NOTATION',
            XMLReader::WHITESPACE             => 'WHITESPACE',
            XMLReader::SIGNIFICANT_WHITESPACE => 'SIGNIFICANT_WHITESPACE',
            XMLReader::END_ELEMENT            => 'END_ELEMENT',
            XMLReader::END_ENTITY             => 'END_ENTITY',
            XMLReader::XML_DECLARATION        => 'XML_DECLARATION',
        );

        if (null === $nodeType) {
            $nodeType = $this->nodeType;
        }

        return $strings[$nodeType];
    }
1261688
public function labelForNodeType($nodeTypeName)
    {
        if (!$this->nodeTypeManager->hasNodeType($nodeTypeName)) {
            $explodedNodeTypeName = explode(':', $nodeTypeName);

            return end($explodedNodeTypeName);
        }

        $nodeType = $this->nodeTypeManager->getNodeType($nodeTypeName);

        return $nodeType->getLabel();
    }
895448
protected function getNodeName($data)
    {
        if (is_object($data)) {
            $nodeName = preg_replace('/.*\\\/', '', get_class($data));
            return preg_replace('/\W/', '', $nodeName);
        } elseif (is_array($data)) {
            return 'array';
        }
        return $this->defaultNodeName;
    }
1232480
public function showCommand(string $nodeType = null): void
    {
        if ($nodeType !== null) {
            /** @var NodeType $nodeType */
            $nodeType = $this->nodeTypeManager->getNodeType($nodeType);
            $configuration = $nodeType->getFullConfiguration();
        } else {
            $nodeTypes = $this->nodeTypeManager->getNodeTypes();
            $configuration = [];
            /** @var NodeType $nodeType */
            foreach ($nodeTypes as $nodeTypeName => $nodeType) {
                $configuration[$nodeTypeName] = $nodeType->getFullConfiguration();
            }
        }
        $this->output(Yaml::dump($configuration, 5, 2));
    }
970951
protected function getClassNameForType($type)
    {
        if (!empty($this->rootNamespace) && strstr($type, $this->rootNamespace)) {
            $type = $this->stripNamespace($this->rootNamespace, $type);
        }
        if (!empty($this->rootNamespace)) {
            return sprintf('%s\\%s', $this->rootNamespace, $type);
        }
        return $type;
    }
134383
public static function TokenizedTypeFromXmlType( $type )
	{
		// Sanity check
		if ( is_null( $type )  || ! is_string( $type ) )
		{
			return XmlTokenizedType::None;
		}

		$types = SchemaTypes::getInstance();
		$atom = $types->getAtomicType( $type );

		return isset( XmlTokenizedType::$typeToCodeMap[ $atom ] )
			? XmlTokenizedType::$typeToCodeMap[ $atom ]
			: XmlTokenizedType::None;
	}
640936
public function getNodeType()
	{
		if ( is_null( $this->domNode ) ) return null;
		return isset(  DOMXPathNavigator::$nodeTypeMap[ $this->domNode->nodeType ] )
			? DOMXPathNavigator::$nodeTypeMap[ $this->domNode->nodeType ]
			: XPathNodeType::Element;
	}
250544
protected function normalizeType(string $type) : string
    {
        $type = ltrim($type, '\\');
        foreach (self::module()->namespaces as $name => $namespace) {
            if (strpos($type, $namespace->getClassNamespace()) !== false) {
                return $name . substr($type, strlen($namespace->getClassNamespace()) + 1);
            }
        }

        return null;
    }
794376
public function isOfType(NodeInterface $node, string $nodeType): bool
    {
        return $node->getNodeType()->isOfType($nodeType);
    }
911523
def get_node_type(type_str):
    """"""
    if type_str == "container":
        return NodeType.CONTAINER
    elif type_str == "loop_plate":
        return NodeType.LOOP
    elif type_str == "assign":
        return NodeType.ASSIGN
    elif type_str == "condition":
        return NodeType.CONDITION
    elif type_str == "decision":
        return NodeType.DECISION
    else:
        raise ValueError("Unrecognized type string: ", type_str)
1319728
private function resolveType($node)
    {
        if ($node instanceof Node\NullableType) {
            $node->type = $this->resolveType($node->type);
            return $node;
        }
        if ($node instanceof Name) {
            return $this->resolveClassName($node);
        }

        return $node;
    }
551384
public function getContentTypeName($contentType)
    {
        if (!$contentType instanceof ContentType) {
            try {
                $contentType = $this->contentTypeService->loadContentType($contentType);
            } catch (NotFoundException $e) {
                return '';
            }
        }

        return $contentType->getName();
    }
287387
static public function getType($strType){
		//convert reserved names to the actual objects
		$arrReservere = array(
			'array' => 'ArrayObject',
			'bool' => 'BooleanObject',
			'boolean' => 'BooleanObject',
			'datetime' => 'DateTimeObject',
			'dictionary' => 'DictionaryObject',
			'enum' => 'EnumObject',
			'id' => 'IdObject',
			'int' => 'IntObject',
			'float' => 'FloatObject',
			'string' => 'StringObject',
			'resource' => 'ResourceObject',
			'object' => 'ObjectObject',
			'objectarray' => 'ObjectArrayObject',
			'number' => 'NumberObject',
			'numeric' => 'NumberObject',
			'fixeddictionary' => 'FixedDictionaryObject'
		);

		if(array_key_exists(strtolower($strType), $arrReservere)){
			$strType = $arrReservere[strtolower($strType)];
		}

		$strType = 'Frozensheep\\Synthesize\\Type\\'.ucfirst($strType);

		return $strType;
	}
1135753
public function getXMLDBFieldType($type) {

        $result = XMLDB_TYPE_INCORRECT;

        switch (strtolower($type)) {
            case 'int':
                $result = XMLDB_TYPE_INTEGER;
                break;
            case 'number':
                $result = XMLDB_TYPE_NUMBER;
                break;
            case 'float':
                $result = XMLDB_TYPE_FLOAT;
                break;
            case 'char':
                $result = XMLDB_TYPE_CHAR;
                break;
            case 'text':
                $result = XMLDB_TYPE_TEXT;
                break;
            case 'binary':
                $result = XMLDB_TYPE_BINARY;
                break;
            case 'datetime':
                $result = XMLDB_TYPE_DATETIME;
                break;
        }
        // Return the normalized XMLDB_TYPE
        return $result;
    }
1136474
private function getResponseCharset($contentType)
    {
        $start = strpos($contentType, '=');
        $type = '';

        if ($start !== false)
        {
            $type = strtoupper(trim(substr($contentType, $start + 1)));
        }

        return $type;
    }
16825
public static function GetXmlTypeCodeFromType( $type )
	{
		/**
		 * @var TypeCode
		 */
		switch ( $type->getTypeCode() )
		{
			case TypeCode::Boolean:
				return XmlTypeCode::Boolean;
			case TypeCode::Int16:
				return XmlTypeCode::Short;
			case TypeCode::Int32:
				return XmlTypeCode::Int;
			case TypeCode::Int64:
				return XmlTypeCode::Long;
			case TypeCode::UInt16:
				return XmlTypeCode::UnsignedShort;
			case TypeCode::UInt32:
				return XmlTypeCode::UnsignedInt;
			case TypeCode::UInt64:
				return XmlTypeCode::UnsignedLong;
			case TypeCode::SByte:
				return XmlTypeCode::Byte;
			case TypeCode::Byte:
				return XmlTypeCode::UnsignedByte;
			case TypeCode::Single:
				return XmlTypeCode::Float;
			case TypeCode::Decimal:
				return XmlTypeCode::Decimal;
			case TypeCode::Double:
				return XmlTypeCode::Double;
			case TypeCode::Char:
			case TypeCode::String:
				return XmlTypeCode::String;
			default:
				$typeName = $type->getTypeName();
				if ($typeName == DOMXPathNavigator::$CLASSNAME )
					return XmlTypeCode::Node;
				if ($typeName == UntypedAtomic::$CLASSNAME )
					return XmlTypeCode::UntypedAtomic;
				if ($typeName == Integer::$CLASSNAME )
					return XmlTypeCode::Integer;
				if ($typeName == DateTimeValue::$CLASSNAME )
					return XmlTypeCode::DateTime;
				if ($typeName == DateValue::$CLASSNAME )
					return XmlTypeCode::Date;
				if ($typeName == TimeValue::$CLASSNAME )
					return XmlTypeCode::Time;
				if ($typeName == DurationValue::$CLASSNAME )
					return XmlTypeCode::Duration;
				if ($typeName == YearMonthDurationValue::$CLASSNAME)
					return XmlTypeCode::YearMonthDuration;
				if ($typeName == DayTimeDurationValue::$CLASSNAME )
					return XmlTypeCode::DayTimeDuration;
				if ($typeName == GYearMonthValue::$CLASSNAME )
					return XmlTypeCode::GYearMonth;
				if ($typeName == GYearValue::$CLASSNAME )
					return XmlTypeCode::GYear;
				if ($typeName == GDayValue::$CLASSNAME )
					return XmlTypeCode::GDay;
				if ($typeName == GMonthValue::$CLASSNAME )
					return XmlTypeCode::GMonth;
				if ($typeName == GMonthDayValue::$CLASSNAME )
					return XmlTypeCode::GMonthDay;
				if ($typeName == QNameValue::$CLASSNAME )
					return XmlTypeCode::QName;
				if ($typeName == AnyUriValue::$CLASSNAME )
					return XmlTypeCode::AnyUri;
				if ($typeName == HexBinaryValue::$CLASSNAME )
					return XmlTypeCode::HexBinary;
				if ($typeName == Base64BinaryValue::$CLASSNAME )
					return XmlTypeCode::Base64Binary;
				if ($typeName == IDREFSValue::$CLASSNAME )
					return XmlTypeCode::Idref;
				if ($typeName == ENTITIESValue::$CLASSNAME )
					return XmlTypeCode::Entity;
				if ($typeName == NMTOKENSValue::$CLASSNAME )
					return XmlTypeCode::NmToken;
				return XmlTypeCode::Item;
		}
	}
153049
public function getNodeType()
	{
		static $nodeType;
		return $nodeType??$nodeType= $this->nodeType??(static function($className){return strtolower(preg_replace('/(?<=\\w)([A-Z])/','_$1',preg_replace('/^(?:\\w+\\\\)*(\\w+)Node$/','$1',$className)));})(get_class($this));
	}