New CLI Script class in Haddock CMS

Haddock CMS has always been intended for running programs at the command line as well as on a web server. Separating the interface from the meat of the program has always been an aim, so where the programs are run shouldn’t matter.

So far, command line scripts have been been contained in .inc files. This has worked quite well but it’s overly complicated and hard to maintain.

CLI scripts are now contained in classes that extend a class called CLIScripts_CLIScript. To run a script, first a set of script object runner scripts are generated. These use the reflection API to run the code in the class.

Leave a Reply