*
* @author Roland Haeder <webmaster@ship-simu.org>
* @version 0.0.0
- * @copyright Copyright (c) 2007, 2008 Roland Haeder, this is free software
+ * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2012 Core Developer Team
* @license GNU GPL 3.0 or any newer version
* @link http://www.ship-simu.org
*
/**
* The *real* file input class we shall use for reading data
*/
- private $inputStream = null;
+ private $inputStream = NULL;
/**
* The *real* file output class we shall use for reading data
*/
- private $outputStream = null;
+ private $outputStream = NULL;
/**
* An instance of this class
*/
- private static $thisInstance = null;
+ private static $selfInstance = NULL;
/**
* Protected constructor
parent::__construct(__CLASS__);
// Set own instance
- self::$thisInstance = $this;
+ self::$selfInstance = $this;
}
/**
*
* @return $ioInstance A prepared instance of FilIOHandler
*/
- public final static function createFileIoHandler () {
+ public static final function createFileIoHandler () {
// Get instance
$ioHandler = new FileIoHandler();
/**
* Getter for an instance of this class
*
- * @return $thisInstance An instance of this class
+ * @return $selfInstance An instance of this class
*/
- public final static function getInstance () {
- return self::$thisInstance;
+ public static final function getSelfInstance () {
+ return self::$selfInstance;
}
/**
/**
* Saves a file with data by using the current output stream
*
- * @param $fileName Name of the file
- * @param $dataArray Array with file contents
+ * @param $fileName Name of the file
+ * @param $dataStream File data stream
* @return void
* @see FileOutputStreamer
*/
- public function saveFile ($fileName, $dataArray) {
+ public function saveFile ($fileName, $dataStream) {
// Get output stream
$outInstance = $this->getOutputStream();
+ // Prepare output array
+ $dataArray = array(
+ // @TODO What is this for?
+ 0 => $this->__toString(),
+ 1 => $dataStream
+ );
+
// Send the fileName and dataArray to the output handler
$outInstance->saveFile($fileName, $dataArray);
}