//* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('DATABASE: Writing ' . strlen($compressedData) . ' bytes ...');
// Write this data BASE64 encoded to the file
- $this->getFileIoInstance()->saveFile($fqfn, $compressedData, $this);
+ $this->getFileIoInstance()->saveStreamToFile($fqfn, $compressedData, $this);
// Debug message
//* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('DATABASE: Flushing ' . count($dataArray) . ' elements to database file completed.');
// find the 'table' which is in fact a directory on the server
try {
// Get a directory pointer instance
- $directoryInstance = FrameworkDirectoryPointer::createFrameworkDirectoryPointer($pathName);
+ $directoryInstance = ObjectFactory::createObjectByConfiguredName('directory_class', array($pathName));
// Initialize the result data, this need to be rewritten e.g. if a local file cannot be read
$resultData = array(
$idx = 1;
// Read the directory with some exceptions
- while (($dataFile = $directoryInstance->readDirectoryExcept(array('.', '..', '.htaccess', '.svn', 'info.' . $this->getFileExtension()))) && (($limitFound < $searchInstance->getLimit()) || ($searchInstance->getLimit() == 0))) {
+ while (($dataFile = $directoryInstance->readDirectoryExcept(array('.htaccess', 'info.' . $this->getFileExtension()))) && (($limitFound < $searchInstance->getLimit()) || ($searchInstance->getLimit() == 0))) {
// Does the extension match?
if (substr($dataFile, -(strlen($this->getFileExtension()))) !== $this->getFileExtension()) {
// Skip this file!
// Try all the requests
try {
// Get a file pointer instance
- $directoryInstance = FrameworkDirectoryPointer::createFrameworkDirectoryPointer($pathName);
+ $directoryInstance = ObjectFactory::createObjectByConfiguredName('directory_class', array($pathName));
// Initialize limit/skip
$limitFound = 0;
$searchInstance = $dataSetInstance->getSearchInstance();
// Read the directory with some exceptions
- while (($dataFile = $directoryInstance->readDirectoryExcept(array('.', '..', '.htaccess', '.svn', 'info.' . $this->getFileExtension()))) && (($limitFound < $searchInstance->getLimit()) || ($searchInstance->getLimit() == 0))) {
+ while (($dataFile = $directoryInstance->readDirectoryExcept(array('.htaccess', 'info.' . $this->getFileExtension()))) && (($limitFound < $searchInstance->getLimit()) || ($searchInstance->getLimit() == 0))) {
// Does the extension match?
if (substr($dataFile, -(strlen($this->getFileExtension()))) !== $this->getFileExtension()) {
// Debug message
unset($data[$this->indexKey]);
// Return it
+ //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('DATABASE: data[' . gettype($data) . ']='.print_r($data, TRUE));
return $data;
}
}