phpModuleManager Version 0.7
by codewright
1. PURPOSE
phpModuleManager is supposed to handle configuration issues that
evolve when using script (php) based modules. A module can be a
website, a library and so on. These modules can be updated using cvs
or svn, still using the same configuration files. Also dependencies
can be added, which will automatically be recognized and handled.
Updating or synchronizing using Ftp is made easier as well, because
configuration files reside outside the main directory.
2. FILE MODEL
The modules don't really need to bring along a configuration file,
because all look the same. A distribution config file is recommended
for making deployment easier. Additional you can provide version
files that provide information that needs to be updated along with
the code.
For each Module it assumes the following structure:
$Root/ - $Root;
$ModuleName/ - $ModuleDir
[www/] - $PublicDir / $PublicHttp
[dyndata/] - $DataDir / $DataHttp
[lib/] - $LibDir
[Module.conf]
config/
[$ModuleName.conf]
Each Module includes the config.php in $Root which loads all
configurations and modules needed by the current module, which is
identified throught the $MODULE variable.
While loading a Module, the ModuleManager tries to load the
Module.conf in the modules directory and searches for a
.conf in the configuration directory.
[Module] // loaded from Module.conf
Version = 0.1 // +
Author = codewright [AT] gmx [.] net // +
Type = Library // +
ModuleDir = // set by phpModuleManager
[DefaultSQL] // independent config section
Host = // +
MODULE DISCOVERY AND CONFIGURATION:
If a Module is requested phpModuleManager first looks for an appropriate
directory in the root path. If it's successful the module is loaded by
parsing the Module.conf within this directory. Additionally a file called
.conf is searched in the config directory. It is included and
appended to the loaded configuration.