const RESULT_INDEX_STATUS = 'status';
const RESULT_INDEX_EXCEPTION = 'exception';
+ // Constants for MySQL backward-compatiblity (PLEASE FIX THEM!)
+ const DB_CODE_TABLE_MISSING = 0x100;
+ const DB_CODE_TABLE_UNWRITEABLE = 0x101;
+ const DB_CODE_DATA_FILE_CORRUPT = 0x102;
+
+ // Status results
+ const RESULT_OKAY = 'ok';
+
/**
* Last thrown exception or NULL if all is fine
*/
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
class LocalFileDatabase extends BaseDatabaseBackend implements DatabaseBackendInterface {
- // Constants for MySQL backward-compatiblity (PLEASE FIX THEM!)
- const DB_CODE_TABLE_MISSING = 0x100;
- const DB_CODE_TABLE_UNWRITEABLE = 0x101;
- const DB_CODE_DATA_FILE_CORRUPT = 0x102;
-
- // Status results
- const RESULT_OKAY = 'ok';
-
/**
* The file's extension
*/
// Initialize the result data, this need to be rewritten e.g. if a local file cannot be read
$resultData = array(
- BaseDatabaseBackend::RESULT_INDEX_STATUS => LocalfileDatabase::RESULT_OKAY,
+ BaseDatabaseBackend::RESULT_INDEX_STATUS => self::RESULT_OKAY,
BaseDatabaseBackend::RESULT_INDEX_ROWS => array()
);
}
/**
- * Determines whether the status of the query was fine (LocalfileDatabase::RESULT_OKAY)
+ * Determines whether the status of the query was fine (BaseDatabaseBackend::RESULT_OKAY)
*
* @return $ifStatusOkay Whether the status of the query was okay
*/
public function ifStatusIsOkay () {
- return ((isset($this->resultArray[BaseDatabaseBackend::RESULT_INDEX_STATUS])) && ($this->resultArray[BaseDatabaseBackend::RESULT_INDEX_STATUS] === LocalfileDatabase::RESULT_OKAY));
+ return ((isset($this->resultArray[BaseDatabaseBackend::RESULT_INDEX_STATUS])) && ($this->resultArray[BaseDatabaseBackend::RESULT_INDEX_STATUS] === BaseDatabaseBackend::RESULT_OKAY));
}
/**