
Currently we have the ability to set up conf/ApplicationDelegate.php, which lets us extend DF. I assume DF is just set to somehow do a requires/include of that file. The same with tables/tablename.php for the tables Delegate Class.
I am curious then if there is some automatic (read ini driven) mechanism to require/include php files or use User/Developer created Delegate classes in the Dateface path. Thus, we would be able to create Delegate classes that would be used by all of our Dataface apps, not just on an app by app basis?
I know a while back on the forum a post about path.to.dataface/modules was made. And the statements made at that time were that it was not used currently. Has this changed? If so how do we use it? If it is not being used at this time, I assume anyone could simply go into the DF php files and add their own imports/includes. Perhaps just in dataface-public-api.php. And then place their classes in modules or any other place to which they had done a requires/include.
However I am thinking along the lines of the Dataface/modules directory. So there would be one central location for all addons, and merely placing them in the directory, as the README suggests, would get them added to the api. Or, perhaps in conf.ini, the modules to be used would be chosen under a [modules] heading. So for a module to be used, it would have to be under that heading. Further perhaps their could be a directory structure under modules to make it more manageable.
Thus the directory structure would be something like:
path.to.df/modules/gantt/
path.to.df/modules/INIPermissions/
path.to.df/modules/ReportWriter/
With the modules heading in conf.ini looking something like this:
[modules]
allModules = 0/1
somesetting = gantt
somesetting = ReportWriter/pdfOUT.php (only include one report..not the entire tree..)
Since ini files are modifable by the user, and we can create our own code to read them, this could be something that we would be able to assist Mr. Steve with if he and others are interested.
Of course if it already exists...we just need to learn how to use it. And if it doesnt, the example I just gave isnt the only way to do it...
Comments and ideas most welcome...
I am curious then if there is some automatic (read ini driven) mechanism to require/include php files or use User/Developer created Delegate classes in the Dateface path. Thus, we would be able to create Delegate classes that would be used by all of our Dataface apps, not just on an app by app basis?
I know a while back on the forum a post about path.to.dataface/modules was made. And the statements made at that time were that it was not used currently. Has this changed? If so how do we use it? If it is not being used at this time, I assume anyone could simply go into the DF php files and add their own imports/includes. Perhaps just in dataface-public-api.php. And then place their classes in modules or any other place to which they had done a requires/include.
However I am thinking along the lines of the Dataface/modules directory. So there would be one central location for all addons, and merely placing them in the directory, as the README suggests, would get them added to the api. Or, perhaps in conf.ini, the modules to be used would be chosen under a [modules] heading. So for a module to be used, it would have to be under that heading. Further perhaps their could be a directory structure under modules to make it more manageable.
Thus the directory structure would be something like:
path.to.df/modules/gantt/
path.to.df/modules/INIPermissions/
path.to.df/modules/ReportWriter/
With the modules heading in conf.ini looking something like this:
[modules]
allModules = 0/1
somesetting = gantt
somesetting = ReportWriter/pdfOUT.php (only include one report..not the entire tree..)
Since ini files are modifable by the user, and we can create our own code to read them, this could be something that we would be able to assist Mr. Steve with if he and others are interested.
Of course if it already exists...we just need to learn how to use it. And if it doesnt, the example I just gave isnt the only way to do it...
Comments and ideas most welcome...