/*!
\static
Decodes a DOM node and returns the PHP datatype instance of it.
329615
static function decodeDataTypes( $node, $type = "" )
    {
        $returnValue = false;

        $attributeValue = '';
        $attribute = $node->getAttributeNodeNS( eZSOAPEnvelope::SCHEMA_INSTANCE, 'type' );
        if ( !$attribute )
        {
            $attribute = $node->getAttributeNodeNS( 'http://www.w3.org/1999/XMLSchema-instance', 'type' );
        }
        $attributeValue = $attribute->value;

        $dataType = $type;
        $attrParts = explode( ":", $attributeValue );
        if ( $attrParts[1] )
        {
            $dataType = $attrParts[1];
        }

/*
        $typeNamespacePrefix = $this->DOMDocument->namespaceByAlias( $attrParts[0] );

        check that this is a namespace type definition
                if ( ( $typeNamespacePrefix == eZSOAPEnvelope::SCHEMA_DATA ) ||
                     ( $typeNamespacePrefix == eZSOAPEnvelope::ENC )
                     )
TODO: add encoding checks with schema validation.
*/

        switch ( $dataType )
        {
            case "string" :
            case "int" :
            case "float" :
            case 'double' :
            {
                $returnValue = $node->textContent;
            } break;

            case "boolean" :
            {
                if ( $node->textContent == "true" )
                    $returnValue = true;
                else
                    $returnValue = false;
            } break;

            case "base64" :
            {
                $returnValue = base64_decode( $node->textContent );
            } break;

            case "Array" :
            {
                // Get array type
                $arrayType = $node->getAttributeNodeNS( eZSOAPEnvelope::ENC, 'arrayType' )->value;
                $arrayTypeParts = explode( ":", $arrayType );

                preg_match( "#(.*)\[(.*)\]#",  $arrayTypeParts[1], $matches );

                $type = $matches[1];
                $count = $matches[2];

                $returnValue = array();
                foreach( $node->childNodes as $child )
                {
                    if ( $child instanceof DOMElement )
                    {
                        $returnValue[] = eZSOAPResponse::decodeDataTypes( $child, $type );
                    }
                }
            }break;

            case "SOAPStruct" :
            {
                $returnValue = array();

                foreach( $node->childNodes as $child )
                {
                    if ( $child instanceof DOMElement )
                    {
                        $returnValue[$child->tagName] = eZSOAPResponse::decodeDataTypes( $child );
                    }
                }
            }break;

            default:
            {
                foreach ( $node->childNodes as $childNode )
                {
                    if ( $childNode instanceof DOMElement )
                    {
                        // check data type for child
                        $attr = $childNode->getAttributeNodeNS( eZSOAPEnvelope::SCHEMA_INSTANCE, 'type' )->value;

                        $dataType = false;
                        $attrParts = explode( ":", $attr );
                        $dataType = $attrParts[1];

                        $returnValue[$childNode->tagName] = eZSOAPResponse::decodeDataTypes( $childNode );
                    }
                }

            } break;
        }

        return $returnValue;
    }
200658
public static function __static()
	{
		$prefixes = array( STANDARD_PREFIX_SCHEMA, STANDARD_PREFIX_XBRLI, STANDARD_PREFIX_LINK, STANDARD_PREFIX_XLINK, STANDARD_PREFIX_GENERIC, STANDARD_PREFIX_XBRLDT, STANDARD_PREFIX_XBRLDI );
		self::$standardNamespaces = $temp = array_flip( array_intersect_key( self::$standardPrefixes, array_flip( $prefixes ) ) );

		self::$standardArcElements = array_flip(
			array(
				"definitionArc",
				"calculationArc",
				"presentationArc",
				"labelArc",
				"referenceArc",
				"footnoteArc",
			)
		);

		self::$standardLinkElements = array_flip(
			array(
				"definitionLink",
				"calculationLink",
				"presentationLink",
				"labelLink",
				"referenceLink",
				"footnoteLink",
				"label",
				"footnote",
				"reference",
			)
		);

		foreach ( self::$standardArcElements as $arc => $value )
		{
			$qname = self::qnameNS( "link:$arc" );
			self::$standardArcQnames[ (string) $qname ] = $qname;
		}

		foreach ( self::$standardLinkElements as $link => $value )
		{
			/**
			 * @var QName qname
			 */
			$qname = self::qnameNS( "link:$link" );
			self::$standardExtLinkQnamesAndResources[ (string) $qname ] = $qname;
		}

		self::$standardExtLinkQnames = array_filter(
			self::$standardExtLinkQnamesAndResources,
			function( $qname ) { return XBRL::endsWith( $qname->localName, 'Link' ); }
		);

		self::$resourceArcRoles = array_flip(
			array(
				self::$arcRoleConceptLabel,
				self::$arcRoleConceptReference,
				self::$arcRoleFactFootnote,
				self::$genericElementLabel,
				self::$genericElementReference,
			)
		);

		self::$standardLabelRoles = array(
			self::$labelRoleLabel,
			self::$labelRoleTerseLabel,
			self::$labelRoleVerboseLabel,
			self::$labelRolePositiveLabel,
			self::$labelRolePositiveTerseLabel,
			self::$labelRolePositiveVerboseLabel,
			self::$labelRoleNegativeLabel,
			self::$labelRoleNegativeTerseLabel,
			self::$labelRoleNegativeVerboseLabel,
			self::$labelRoleZeroLabel,
			self::$labelRoleZeroTerseLabel,
			self::$labelRoleZeroVerboseLabel,
			self::$labelRoleTotalLabel,
			self::$labelRolePeriodStartLabel,
			self::$labelRolePeriodEndLabel,
			self::$labelRoleDocumentation,
			self::$labelRoleDefinitionGuidance,
			self::$labelRoleDisclosureGuidance,
			self::$labelRolePresentationGuidance,
			self::$labelRoleMeasurementGuidance,
			self::$labelRoleCommentaryGuidance,
			self::$labelRoleExampleGuidance,
		);

		self::$standardRoles = array_flip(
			array_merge(
				self::$standardLabelRoles,
				self::$standardReferenceRoles,
				self::$standardLinkbaseRefRoles,
				array(
						self::$defaultLinkRole,
						self::$footnote,
				)
			)
		);

		self::$standardArcRoles = array_flip(
			array(
				self::$linkCalculationArc,
				self::$linkDefinitionArc,
				self::$linkFootnoteArc,
				self::$linkLabelArc,
				self::$linkPresentationArc,
				self::$linkReferenceArc,
			)
		);

		self::$standardArcroleCyclesAllowed = array(
			self::$arcRoleConceptLabel		=> array( "any", null ),
			self::$arcRoleConceptReference	=> array( "any", null ),
			self::$arcRoleFactFootnote		=> array( "any", null ),
			self::$arcRoleParentChild		=> array( "undirected", "xbrl.5.2.4.2" ),
			self::$arcRoleSummationItem		=> array( "any", "xbrl.5.2.5.2" ),
			self::$arcRoleGeneralSpecial	=> array( "undirected", "xbrl.5.2.6.2.1" ),
			self::$arcRoleEssenceAlias		=> array( "undirected", "xbrl.5.2.6.2.1" ),
			self::$arcRoleSimilarTuples		=> array( "any", "xbrl.5.2.6.2.3" ),
			self::$arcRoleRequiresElement	=> array( "any", "xbrl.5.2.6.2.4" ),
		);

		self::$consecutiveArcrole = array( // can be list of or single arcrole
			'all'						=> array( self::$arcRoleDimensionDomain, self::$arcRoleHypercubeDimension ),
			'notAll'					=> array( self::$arcRoleDimensionDomain, self::$arcRoleHypercubeDimension ),
			'hypercubeDimension'		=> self::$arcRoleDimensionDomain,
			'dimensionDomain'			=> array( self::$arcRoleDomainMember, self::$arcRoleAll, self::$arcRoleNotAll ),
			'domainMember'				=> array( self::$arcRoleDomainMember, self::$arcRoleAll, self::$arcRoleNotAll ),
			'dimensionDefault'			=> array(),
		);

		self::$hasHypercube = array(
			self::$arcRoleAll,
			self::$arcRoleNotAll,
		);

		self::$standardLinkbaseRefRoles = array(
			self::$CalculationLinkbaseRef,
			self::$DefinitionLinkbaseRef,
			self::$LabelLinkbaseRef,
			self::$PresentationLinkbaseRef,
			self::$ReferenceLinkbaseRef,
		);

		self::$arcCustomAttributesExclusions = array(
			'http://www.w3.org/2000/xmlns',
			self::$standardPrefixes[ STANDARD_PREFIX_XLINK ],
			"use",
			"priority",
			"order",
		);

		self::$xbrliSubstitutionHeads = array(
			self::$xbrldtDimensionItem,
			self::$xbrldtHypercubeItem,
			self::$xbrliItem,
			self::$xbrliTuple,
		);

		self::$arcRoleDimensional = array(
			XBRL_Constants::$arcRoleAll,
			XBRL_Constants::$arcRoleNotAll,
			XBRL_Constants::$arcRoleDimensionDomain,
			XBRL_Constants::$arcRoleDomainMember,
			XBRL_Constants::$arcRoleDimensionMember,
			XBRL_Constants::$arcRoleHypercubeDimension,
			XBRL_Constants::$arcRoleDimensionDefault,
		);
	}
785803
private static function DOMtoArray($node)
    {
        $occurence = array();
        $result = null;

        if ($node->childNodes) {
            foreach ($node->childNodes as $child) {
                if (isset($occurence[$child->nodeName])) {
                    $occurence[$child->nodeName]++;
                } else {
                    $occurence[$child->nodeName] = 1;
                }
            }
        }

        if ($node->nodeType == XML_TEXT_NODE || $node->nodeType == XML_CDATA_SECTION_NODE) {
            $result = html_entity_decode(
                htmlentities(
                    (string) $node->nodeValue,
                    ENT_COMPAT,
                    'UTF-8'
                ),
                ENT_COMPAT,
                'ISO-8859-15'
            );
        } else {
            if ($node->hasChildNodes()) {
                $children = $node->childNodes;

                for ($i=0; $i<$children->length; $i++) {
                    $child = $children->item($i);

                    switch ($child->nodeName) {
                        case '#cdata-section':
                        case '#text':
                            $text = static::DOMtoArray($child);

                            if (trim($text) != '') {
                                $result[self::VALUE] = static::DOMtoArray($child);
                            };
                            break;

                        default:
                            if ($occurence[$child->nodeName] > 1) {
                                $result[$child->nodeName][] = static::DOMtoArray($child);
                            } else {
                                $result[$child->nodeName] = static::DOMtoArray($child);
                            }
                    }
                }
            }

            if ($node->hasAttributes()) {
                $attributes = $node->attributes;

                if (!is_null($attributes)) {
                    foreach ($attributes as $key => $attr) {
                        $result[self::ATTRIBUTES][$attr->name] = $attr->value;
                    }
                }
            }
        }

        return $result;
    }
905698
private function decodeNumberNode(\DOMNode $node)
    {
        $value = $node->nodeValue;

        if ($value === (string) (int) $value) {
            return (int) $value;
        }

        return (float) $value;
    }
390347
public function htmlDecode($data)
    {
        switch (gettype($data)) {
            case 'array':
                foreach ($data as $key => $value) {
                    $data[$key] = $this->htmlDecode($value);
                }

                break;
            case 'object':
                $data = clone $data;

                foreach ($data as $key => $value) {
                    $data->$key = $this->htmlDecode($value);
                }

                break;
            case 'string':
            default:
                $data = html_entity_decode($data, ENT_QUOTES, 'UTF-8');

                break;
        }

        return $data;
    }
240017
function decodeLength(s) {
	var size = new type.UInt8().read(s).value;
	if(size & 0x80) {
		size &= ~0x80;
		if(size === 1) {
			size = new type.UInt8().read(s).value;
		}
		else if(size === 2) {
			size = new type.UInt16Be().read(s).value;
		}
		else{
			throw new error.ProtocolError('NODE_RDP_ASN1_BER_INVALID_LENGTH');
		}
	}
	return size;
}
974299
protected static function _decodeValue($node)
    {
        switch ($node['type'])
        {
            case 'integer':
                $value = (string) $node;
                return (int) $value;
                break;

            case 'string':
                return (string) $node;
                break;

            case 'boolean':
                $value = (string) $node;
                return (bool) $value;
                break;

            case 'double':
                $value = (string) $node;
                return (float) $value;
                break;

            case 'array':
            default     :

                $value = array();
                foreach ($node->children() as $child) {
                    $value[(string) $child['name']] = self::_decodeValue($child);
                }

                break;
        }

        return $value;
    }
135632
public function getFldTypeForPhp()
    {
        $type = 'mixed';
        switch ($this->getFldType()) {
            case FFCST::TYPE_INTEGER:
            case FFCST::TYPE_BIGINT:
                $type = 'int';
                break;
            case FFCST::TYPE_DATETIME:
            case FFCST::TYPE_MD5:
            case FFCST::TYPE_STRING:
                $type = 'string';
                break;
            case FFCST::TYPE_BOOLEAN:
                $type = 'bool';
                break;
        }
        return $type;
    }
903507
function decodeXML( $xmlString )
    {
        $dom = new DOMDocument( '1.0', 'utf-8' );
        $success = $dom->loadXML( $xmlString );
        if ( $xmlString != "" )
        {
            // set the name of the node
            $nameArray = $dom->getElementsByTagName( "name" );
            $this->setName( $nameArray->item( 0 )->textContent );

            $columnsNode = $dom->getElementsByTagName( "columns" )->item( 0 );
            $numColumns = $columnsNode->getAttribute( 'number');

            $rowsNode = $dom->getElementsByTagName( "rows" )->item( 0 );
            $numRows = $rowsNode->getAttribute( 'number' );

            $namedColumns = $dom->getElementsByTagName( "column" );
            $namedColumnList = array();
            if ( $namedColumns->length > 0 )
            {
                foreach ( $namedColumns as $namedColumn )
                {
                    $columnName = $namedColumn->textContent;
                    $columnID = $namedColumn->getAttribute( 'id' );
                    $columnNumber = $namedColumn->getAttribute( 'num' );
                    $namedColumnList[$columnNumber] = array( 'name' => $columnName,
                                                             'column_number' => $columnNumber,
                                                             'column_id' => $columnID );
                }
            }
            $cellNodes = $dom->getElementsByTagName( "c" );
            $cellList = array();
            foreach ( $cellNodes as $cellNode )
            {
                $cellList[] = $cellNode->textContent;
            }

            $rows = array( 'sequential' => array() );
            $sequentialRows = array();

            for ( $i = 1; $i <= $numRows; $i++ )
            {
                $row = array( 'identifier' => 'row_' . $i ,
                              'name' => 'Row_' . $i );
                $rowColumns = array();
                for ( $j = 1; $j <= $numColumns; $j++ )
                {
                    $rowColumns[] = $cellList[ ($i-1) * $numColumns + $j-1];
                }
                $row['columns'] = $rowColumns;
                $sequentialRows[] = $row;
            }
            $rows['sequential'] = $sequentialRows;

            $columns = array( 'sequential' => array(),
                              'id' => array() );
            $sequentialColumns = array();
            $idColumns = array();

            for ( $i = 0; $i < $numColumns; $i++ )
            {
                if ( isset( $column ) )
                    unset( $column );
                $column = array();
                if ( isset( $namedColumnList[$i] ) && is_array( $namedColumnList[$i] ) )
                {
                    $column = array( 'identifier' => $namedColumnList[$i]['column_id'],
                                     'index' => $i,
                                     'name' => $namedColumnList[$i]['name'] );
                }
                else
                {
                    $column = array( 'identifier' => 'col_' . ($i + 1),
                                     'index' => $i,
                                     'name' => 'Col_' . ($i + 1) );

                }

                $columnRows = array();
                for( $j = 0; $j < $numRows; $j++ )
                {
                    $columnRows[] = $sequentialRows[$j]['columns'][$i];
                }
                $column['rows'] = $columnRows;
                $sequentialColumns[] = $column;
                $idColumns[$column['identifier']] = $column;
            }
            $columns['sequential'] = $sequentialColumns;
            $columns['id'] = $idColumns;

            $matrix = array( 'rows' => $rows,
                             'columns' => $columns,
                             'cells' => $cellList );

            $this->Matrix = $matrix;
            $this->NumRows = $numRows;
            $this->NumColumns = $numColumns;
            $this->Cells = $cellList;
        }
        else
        {
            $this->Cells = array();
            $this->Matrix = array();
        }
    }
157251
private function staticMember($var_node) {
    $node = new ClassMemberLookupNode();
    $node->addChild($var_node, 'className');
    $this->mustMatch(T_DOUBLE_COLON, $node);
    $node->addChild($this->indirectReference(), 'memberName');
    return $node;
  }
431166
public static function __static()
	{
		SequenceTypes::$Void = SequenceType::WithTypeCode( XmlTypeCode::None );
		SequenceTypes::$Item = SequenceType::WithTypeCode( XmlTypeCode::Item );
		SequenceTypes::$ItemS = SequenceType::WithTypeCodeAndCardinality( XmlTypeCode::Item, XmlTypeCardinality::ZeroOrMore );
		SequenceTypes::$Node = SequenceType::WithTypeCode( XmlTypeCode::Node );
		SequenceTypes::$ProcessingInstruction = SequenceType::WithTypeCode( XmlTypeCode::ProcessingInstruction );
		SequenceTypes::$Text = SequenceType::WithTypeCode( XmlTypeCode::Text );
		SequenceTypes::$Comment = SequenceType::WithTypeCode( XmlTypeCode::Comment );
		SequenceTypes::$Element = SequenceType::WithTypeCode( XmlTypeCode::Element );
		SequenceTypes::$Attribute = SequenceType::WithTypeCode( XmlTypeCode::Attribute );
		SequenceTypes::$Document = SequenceType::WithTypeCode( XmlTypeCode::Document );
		SequenceTypes::$Boolean = SequenceType::WithTypeCode( XmlTypeCode::Boolean );
		SequenceTypes::$AnyAtomicType = SequenceType::WithTypeCode( XmlTypeCode::AnyAtomicType );
		SequenceTypes::$AnyAtomicTypeO = SequenceType::WithTypeCodeAndCardinality( XmlTypeCode::AnyAtomicType, XmlTypeCardinality::ZeroOrOne );
		SequenceTypes::$Double = SequenceType::WithTypeCode( XmlTypeCode::Double );
		SequenceTypes::$Float = SequenceType::WithTypeCode( XmlTypeCode::Float );
		SequenceTypes::$Date = SequenceType::WithTypeCode( XmlTypeCode::Date );
		SequenceTypes::$Time = SequenceType::WithTypeCode( XmlTypeCode::Time );
		SequenceTypes::$DateTime = SequenceType::WithTypeCode( XmlTypeCode::DateTime );
		SequenceTypes::$StringX = SequenceType::WithTypeCodeAndCardinality (XmlTypeCode::String, XmlTypeCardinality::ZeroOrOne );
		SequenceTypes::$Int = SequenceType::WithTypeCode( XmlTypeCode::Int );
		SequenceTypes::$AnyUri = SequenceType::WithTypeCode( XmlTypeCode::AnyUri );
	}
238030
public function extractAndFormatNodeValue($node)
    {
        // Default cell type is "n"
        $cellType = $node->getAttribute(self::XML_ATTRIBUTE_TYPE) ?: self::CELL_TYPE_NUMERIC;
        $cellStyleId = intval($node->getAttribute(self::XML_ATTRIBUTE_STYLE_ID));
        $vNodeValue = $this->getVNodeValue($node);

        if (($vNodeValue === '') && ($cellType !== self::CELL_TYPE_INLINE_STRING)) {
            return $vNodeValue;
        }

        switch ($cellType) {
            case self::CELL_TYPE_INLINE_STRING:
                return $this->formatInlineStringCellValue($node);
            case self::CELL_TYPE_SHARED_STRING:
                return $this->formatSharedStringCellValue($vNodeValue);
            case self::CELL_TYPE_STR:
                return $this->formatStrCellValue($vNodeValue);
            case self::CELL_TYPE_BOOLEAN:
                return $this->formatBooleanCellValue($vNodeValue);
            case self::CELL_TYPE_NUMERIC:
                return $this->formatNumericCellValue($vNodeValue, $cellStyleId);
            case self::CELL_TYPE_DATE:
                return $this->formatDateCellValue($vNodeValue);
            default:
                return null;
        }
    }
121668
function decodeXML($xmlstg)
	{
		preg_match_all ("/<(.*?)>(.*?)\</", $xmlstg, $out, PREG_SET_ORDER);

		$n = 0;
		while (isset($out[$n]))
		{
			$retarr[$out[$n][1]] = strip_tags($out[$n][0]);
			$n++;
		}

		return $retarr;
	}
1067081
private function decodeValue($value) {

        $children = $value->children();

        if ( count($children) != 1 ) throw new XmlrpcException("Cannot decode value: invalid value element");

        $child = $children[0];

        $child_type = $child->getName();

        switch ( $child_type ) {

            case "i4":
            case "int":
                $return_value = $this->decodeInt($child);
            break;

            case "double":
                $return_value = $this->decodeDouble($child);
            break;

            case "boolean":
                $return_value = $this->decodeBool($child);
            break;

            case "base64":
                $return_value = $this->decodeBase($child);
            break;
            
            case "dateTime.iso8601":
                $return_value = $this->decodeIso8601Datetime($child);
            break;

            case "string":
                $return_value = $this->decodeString($child);
            break;

            case "array":
                $return_value = $this->decodeArray($child);
            break;
            
            case "struct":
                $return_value = $this->decodeStruct($child);
            break;
            
            case "nil":
            case "ex:nil":
                $return_value = $this->decodeNil();
            break;
            
            default:
                throw new XmlrpcException("Cannot decode value: invalid value type");
            break;

        }

        return $return_value;

    }
699299
private function selectNodeType(\DOMNode $node, $val): bool
    {
        if (\is_array($val)) {
            return $this->buildXml($node, $val);
        } elseif ($val instanceof \SimpleXMLElement) {
            $child = $this->dom->importNode(dom_import_simplexml($val), true);
            $node->appendChild($child);
        } elseif ($val instanceof \Traversable) {
            $this->buildXml($node, $val);
        } elseif (\is_object($val)) {
            return $this->selectNodeType($node, $this->serializer->normalize($val, $this->format, $this->context));
        } elseif (is_numeric($val)) {
            return $this->appendText($node, (string) $val);
        } elseif (\is_string($val) && $this->needsCdataWrapping($val)) {
            return $this->appendCData($node, $val);
        } elseif (\is_string($val)) {
            return $this->appendText($node, $val);
        } elseif (\is_bool($val)) {
            return $this->appendText($node, (int) $val);
        } elseif ($val instanceof \DOMNode) {
            $child = $this->dom->importNode($val, true);
            $node->appendChild($child);
        }

        return true;
    }
173757
public function parse() {
		if($this->bParsed) {
			return;
		}

		if ($this->replacements) {
            // We cannot rely of html_entity_decode,
            // because it would replace &amp; and &lt; as well,
            // whereas we need to keep them unmodified.
            // We must do it manually, with a modified hardcopy
            // of PHP 5.4+ 's get_html_translation_table(ENT_XHTML)
            $this->source = XMLEntityTransformer::replace($this->source);
		}
		
		$this->xmlParser = xml_parser_create('UTF-8');
		xml_parser_set_option($this->xmlParser, XML_OPTION_CASE_FOLDING, false);
		xml_set_object($this->xmlParser, $this);
		xml_set_element_handler($this->xmlParser, 'openTagHandler', 'closeTagHandler');
		xml_set_character_data_handler($this->xmlParser,'cdataHandler');

		//Prepare the detection of the very first tag, in order to compute
		//the offset in XML string as regarded by the parser.
		$this->firstOpening = true;

		try {
            $bSuccess = xml_parse($this->xmlParser, $this->source);
        } catch (RequiredAttributeException $ex) {
		    throw $ex->setFile($this->filename);
        }

        if ($bSuccess) {
            $errMsg = '';
            $lineNumber = 0;
        } else {
			$errMsg = xml_error_string(xml_get_error_code($this->xmlParser));
			$lineNumber = xml_get_current_line_number($this->xmlParser);
			if(count($this->stack)) {
				$lastElement = $this->stack[count($this->stack) - 1];
				if($lastElement instanceof ViewElementTag) {
					$errMsg .= '. Last element: ' . $lastElement->getTagName() . '(' . $lineNumber . ')';
				}
			}
		}

		xml_parser_free($this->xmlParser);
		$this->bParsed = $bSuccess;

		if(! $bSuccess ) {
			throw new XMLParsingException(
					$errMsg,
					$lineNumber);
		}

		// Store a serialized version of the parsed tree, if successfully parsed,
        // and if we've got a cache path.
        if ( ($this->cachePath) && ($this->filename !== null) && (! $this->unserialized) ) {
            $cacheFile = $this->makeCacheFilename($this->cachePath, $this->templatesRoot, $this->filename, true);
            file_put_contents($cacheFile, serialize($this));
        }


    }
212805
function domString( $domDocument )
    {
        $ini = eZINI::instance();
        $xmlCharset = $ini->variable( 'RegionalSettings', 'ContentXMLCharset' );
        if ( $xmlCharset == 'enabled' )
        {
            $charset = eZTextCodec::internalCharset();
        }
        else if ( $xmlCharset == 'disabled' )
            $charset = true;
        else
            $charset = $xmlCharset;
        if ( $charset !== true )
        {
            $charset = eZCharsetInfo::realCharsetCode( $charset );
        }
        $domString = $domDocument->saveXML();
        return $domString;
    }