runop operations


I am digging through classapp.php, and seeing all of the function references in runop() and runop2(). I realize the ops are called from the gui, but I wonder: is there some sort of text or diagram showing what these functions are actually for, and why they would be called?


For most, function names are self-explanatory. And there are some comments at start of each function that is called in runop.

At start of runop, you can see:
"# these are like url to function mappers... maps op variable to some functions in ehcp; This also can be seen as a controller in MVC model. "

These functions translates urls like http://..../index.php?op=failedlogins
to function failedlogins();

This is something like, modular, object based programming.
in ehcp, flowchart of execution is like:

index.php->classapp.php's Application class->run function->initialize->runop->other function that is called from url

why this? that is just a decision, implementation.
some func does add ftp user, some add(define, setup) domain.

Please note that, some ops are only callable in daemon mode, not ehcp gui.
These are distinguishable by:

at start of functions.
Those functions can only be run in daemon mode.

Also note that, ehcp uses same classapp.php file, hence same class Application, for both gui and daemon operations. So, not all functions run in gui mode, not all in daemon mode. Some are common in both, such as query, executequery etc..

I am sending you a documentation on ehcp structure now.

Ask what you need here, you may also ask in email, info@ e...