XBRL-Instance.php
public function toInstanceCache( $output_path, $output_basename )
	{
		$json = json_encode( array(
			// 'instance_taxonomy' => $this->instance_taxonomy,
			'allowNested' => $this->allowNested,
			// 'cacheContextElements' => $this->cacheContextElements,
			// 'cacheDocumentNamespaces' => $this->cacheDocumentNamespaces,
			// 'cacheNamespaces' => $this->cacheNamespaces,
			'contextDimensionMemberList' => $this->contextDimensionMemberList,
			'contexts' => $this->contexts,
			// 'defaultCurrency' => $this->defaultCurrency,
			'document_name' => $this->document_name,
			'duplicateFacts' => $this->duplicateFacts->toJSON(),
			'elements' => $this->elements,
			'error' => $this->error,
			'footnotes' => $this->footnotes,
			'guid' => $this->guid,
			'instance_namespaces' => $this->instance_namespaces,
			// 'instance_xml' => $this->instance_xml,
			// 'schemaFilename' => $this->schemaFilename,
			'segments' => $this->segments,
			// 'taxonomyToNamespaceMap' => array_keys( $this->taxonomyToNamespaceMap ),
			'tupleRefs' => $this->tupleRefs,
			'uniqueFactIds' => $this->uniqueFactIds,
			'units' => $this->units,
			'usedContexts' => $this->usedContexts,
		) );

		file_put_contents( "$output_path/$output_basename.json", $json );
		$zip = new ZipArchive();
		$zip->open( "$output_path/$output_basename.zip", ZipArchive::CREATE | ZipArchive::OVERWRITE );
		$zip->addFile( "$output_path/$output_basename.json", "$output_basename.json" );

		if ( $zip->close() === false )
		{
			XBRL_Log::getInstance()->err( "Error closing zip file" );
			XBRL_Log::getInstance()->err( $zip->getStatusString() );
		}

	}
public function toInstanceCache( $output_path, $output_basename )
	{
		$json = json_encode( array(
			// 'instance_taxonomy' => $this->instance_taxonomy,
			'allowNested' => $this->allowNested,
			// 'cacheContextElements' => $this->cacheContextElements,
			// 'cacheDocumentNamespaces' => $this->cacheDocumentNamespaces,
			// 'cacheNamespaces' => $this->cacheNamespaces,
			'contextDimensionMemberList' => $this->contextDimensionMemberList,
			'contexts' => $this->contexts,
			// 'defaultCurrency' => $this->defaultCurrency,
			'document_name' => $this->document_name,
			'duplicateFacts' => $this->duplicateFacts->toJSON(),
			'elements' => $this->elements,
			'error' => $this->error,
			'footnotes' => $this->footnotes,
			'guid' => $this->guid,
			'instance_namespaces' => $this->instance_namespaces,
			// 'instance_xml' => $this->instance_xml,
			// 'schemaFilename' => $this->schemaFilename,
			'segments' => $this->segments,
			// 'taxonomyToNamespaceMap' => array_keys( $this->taxonomyToNamespaceMap ),
			'tupleRefs' => $this->tupleRefs,
			'uniqueFactIds' => $this->uniqueFactIds,
			'units' => $this->units,
			'usedContexts' => $this->usedContexts,
		) );

		file_put_contents( "$output_path/$output_basename.json", $json );
		$zip = new ZipArchive();
		$zip->open( "$output_path/$output_basename.zip", ZipArchive::CREATE | ZipArchive::OVERWRITE );
		$zip->addFile( "$output_path/$output_basename.json", "$output_basename.json" );

		if ( $zip->close() === false )
		{
			XBRL_Log::getInstance()->err( "Error closing zip file" );
			XBRL_Log::getInstance()->err( $zip->getStatusString() );
		}

	}
public function toInstanceCache ( $ output_path , $ output_basename ) { $ json = json_encode ( array ( // 'instance_taxonomy' => $this->instance_taxonomy,
 'allowNested' => $ this -> allowNested , // 'cacheContextElements' => $this->cacheContextElements,
 // 'cacheDocumentNamespaces' => $this->cacheDocumentNamespaces,
 // 'cacheNamespaces' => $this->cacheNamespaces,
 'contextDimensionMemberList' => $ this -> contextDimensionMemberList , 'contexts' => $ this -> contexts , // 'defaultCurrency' => $this->defaultCurrency,
 'document_name' => $ this -> document_name , 'duplicateFacts' => $ this -> duplicateFacts -> toJSON ( ) , 'elements' => $ this -> elements , 'error' => $ this -> error , 'footnotes' => $ this -> footnotes , 'guid' => $ this -> guid , 'instance_namespaces' => $ this -> instance_namespaces , // 'instance_xml' => $this->instance_xml,
 // 'schemaFilename' => $this->schemaFilename,
 'segments' => $ this -> segments , // 'taxonomyToNamespaceMap' => array_keys( $this->taxonomyToNamespaceMap ),
 'tupleRefs' => $ this -> tupleRefs , 'uniqueFactIds' => $ this -> uniqueFactIds , 'units' => $ this -> units , 'usedContexts' => $ this -> usedContexts , ) ) ; file_put_contents ( "$output_path/$output_basename.json" , $ json ) ; $ zip = new ZipArchive ( ) ; $ zip -> open ( "$output_path/$output_basename.zip" , ZipArchive :: CREATE | ZipArchive :: OVERWRITE ) ; $ zip -> addFile ( "$output_path/$output_basename.json" , "$output_basename.json" ) ; if ( $ zip -> close ( ) === false ) { XBRL_Log :: getInstance ( ) -> err ( "Error closing zip file" ) ; XBRL_Log :: getInstance ( ) -> err ( $ zip -> getStatusString ( ) ) ; } }
Perist an instance to a file containing a JSON representation
@param string $output_path
@param string $output_basename
@return bool
Perist an instance to a file containing a JSON representation