Type HowTo - Basic concepts




1. Licensing

LAM is licensed under the GNU General Public License. This means your plugins need a compatible license.
LAM is distributed with a copy of the GPL license.


2. Naming and position in directory structure

Type names are usually named after the group of accounts they manage. However, you can use any name you want, it should be short and containing only a-z and 0-9. The type name is only shown in the configuration dialog, on all other pages LAM will show a provided alias name.
All type modules are stored in lib/types. The filename must end with .inc and the file must have the same name as its inside class.

Example: Our example module will provide the class smbDomain, therefore the file will be called lib/types/smbDomain.inc.


3. Defining the class

All type classes have baseType as parent class. This provides common functionality and dummy functions for all required class functions.

Example:

/**
* The account type for Samba domains.
*
* @package types
*/
class
smbDomain extends baseType {

}