*/
private $fileExtension = "serialized";
- /**
- * The IO handler for file handling which should be FileIOHandler.
- */
- private $ioInstance = null;
-
/**
* The last read file's name
*/
// Set save path and IO instance
$dbInstance->setSavePath($savePath);
- $dbInstance->setIOInstance($ioInstance);
+ $dbInstance->setFileIOInstance($ioInstance);
// Return database instance
return $dbInstance;
return $this->savePath;
}
- /**
- * Getter for file extension
- *
- * @return $fileExtension The file extension for all file names
- */
- public final function getFileExtension () {
- return $this->fileExtension;
- }
-
/**
* Saves a given object to the local file system by serializing and
* transparently compressing it
// Save the file to disc we don't care here if the path is there,
// this must be done in later methods.
- $this->getIOInstance()->saveFile($fqfn, array($this->getCompressorChannel()->getCompressorExtension(), $serialized));
+ $this->getFileIOInstance()->saveFile($fqfn, array($this->getCompressorChannel()->getCompressorExtension(), $serialized));
}
/**
$this->setLastFile($fqfn);
// Get instance for file handler
- $inputHandler = $this->getIOInstance();
+ $inputHandler = $this->getFileIOInstance();
// Try to read from it. This makes it sure that the file is
// readable and a valid database file
return $isUsed;
}
- /**
- * Getter for the file IO instance
- *
- *�@return $ioInstance An instance for IO operations
- * @see FileIOHandler The concrete handler for IO operations
- */
- public final function getIOInstance () {
- return $this->ioInstance;
- }
-
- /**
- * Setter for the file IO instance
- *
- * @param $ioInstance An instance for IO operations (should be
- * FileIOHandler)
- * @return void
- */
- public final function setIOInstance (FileIOHandler $ioInstance) {
- $this->ioInstance = $ioInstance;
- }
-
/**
* Setter for the last read file
*
* @param $fqfn The FQFN of the last read file
* @return void
*/
- private function setLastFile ($fqfn) {
+ private final function setLastFile ($fqfn) {
// Cast string
$fqfn = (string) $fqfn;
$this->lastFile = $fqfn;
* @param $contents An array with header and data elements
* @return void
*/
- private function setLastFileContents ($contents) {
+ private final function setLastFileContents ($contents) {
// Cast array
$contents = (array) $contents;
$this->lastContents = $contents;
* @throws MissingMethodException If the required method
* toString() is missing
*/
- public function getObjectFromCachedData ($uniqueID) {
+ public final function getObjectFromCachedData ($uniqueID) {
// Get instance for file handler
- $inputHandler = $this->getIOInstance();
+ $inputHandler = $this->getFileIOInstance();
// Get last file's name and contents
$fqfn = $this->repairFQFN($this->getLastFile(), $uniqueID);