ILIAS  eassessment Revision 61809
 All Data Structures Namespaces Files Functions Variables Groups Pages
PHPExcel_Shared_XMLWriter Class Reference
+ Inheritance diagram for PHPExcel_Shared_XMLWriter:
+ Collaboration diagram for PHPExcel_Shared_XMLWriter:

Public Member Functions

 __construct ($pTemporaryStorage=self::STORAGE_MEMORY, $pTemporaryStorageFolder= './')
 Create a new PHPExcel_Shared_XMLWriter instance.
 __destruct ()
 Destructor.
 getData ()
 Get written data.
 writeRawData ($text)
 Fallback method for writeRaw, introduced in PHP 5.2.

Data Fields

const STORAGE_MEMORY = 1
 Temporary storage method.
const STORAGE_DISK = 2

Private Attributes

 $_tempFileName = ''

Detailed Description

Definition at line 44 of file XMLWriter.php.

Constructor & Destructor Documentation

PHPExcel_Shared_XMLWriter::__construct (   $pTemporaryStorage = self::STORAGE_MEMORY,
  $pTemporaryStorageFolder = './' 
)

Create a new PHPExcel_Shared_XMLWriter instance.

Parameters
int$pTemporaryStorageTemporary storage location
string$pTemporaryStorageFolderTemporary storage folder

Definition at line 62 of file XMLWriter.php.

{
// Open temporary storage
if ($pTemporaryStorage == self::STORAGE_MEMORY) {
$this->openMemory();
} else {
// Create temporary filename
$this->_tempFileName = @tempnam($pTemporaryStorageFolder, 'xml');
// Open storage
if ($this->openUri($this->_tempFileName) === false) {
// Fallback to memory...
$this->openMemory();
}
}
// Set default values
if (DEBUGMODE_ENABLED) {
$this->setIndent(true);
}
}
PHPExcel_Shared_XMLWriter::__destruct ( )

Destructor.

Definition at line 86 of file XMLWriter.php.

{
// Unlink temporary files
if ($this->_tempFileName != '') {
@unlink($this->_tempFileName);
}
}

Member Function Documentation

PHPExcel_Shared_XMLWriter::getData ( )

Get written data.

Returns
$data

Definition at line 98 of file XMLWriter.php.

{
if ($this->_tempFileName == '') {
return $this->outputMemory(true);
} else {
$this->flush();
return file_get_contents($this->_tempFileName);
}
}
PHPExcel_Shared_XMLWriter::writeRawData (   $text)

Fallback method for writeRaw, introduced in PHP 5.2.

Parameters
string$text
Returns
string

Definition at line 113 of file XMLWriter.php.

{
if (method_exists($this, 'writeRaw')) {
return $this->writeRaw(htmlspecialchars($text));
}
return $this->text($text);
}

Field Documentation

PHPExcel_Shared_XMLWriter::$_tempFileName = ''
private

Definition at line 54 of file XMLWriter.php.


The documentation for this class was generated from the following file: