DAL is set up in a way that it provides a transparant layer to the database. So when you want to use DAL in you project all database transactions should run via DAL. This way it makes it easy to use a different DBMS because the funtions of DAL stay the same no matter which DBMS you are using. The only thing you'll have to do is edit the config file and select a different driver in your code.
In this chapter i try to give you the information you'll need when you want to use DAL.
DAL get's configured by a configuration object. This object contains some variables which configure DAL. Below you'll find a list of those variables and the meaning of them.
This is the basedir where DAL is located. The extension dir, drivers dir, and so on are all derived from the basedir.
Contains an array of drivers which can be selected.
Contains an array of arrays which contain the configuration info for a connection to the DBMS. The array with info contains 3 variables:
dbuser (username to use)
dbpassword (password for the username)
dbconnectString (string which can provide extra parameters)
Is it allowed to add new configuration parameters via the script after the configuration file is loaded.
Which dir do we use for extensions
Are extensions allowed to use hooks
Variable which is used by the configuration object itself to assemble a full extension directory
Which language to use. Current choices are:
english
portugues
dutch
Specifies which extension the classes loaded by DAL have. It controles the extension the driver files have and the main class of extensions that can be loaded in. So if you set it by example to ".inc" everything in the drivers dir has .inc as file extension. For an extension called debugger (which main class is class_debugger) the file extension will also be .inc, any classes loaded by the extension are beyond the scope of $fileExt. Also the file extension of class_extensionObject will be .inc because that's also loaded in by DAL.
So summarized the file extension of the following files will be controlled by $fileExt:
drivers/*
$extensionDir/$extension/class_$extension
class_extensionObject