Please bear with me, a newbie here.
I'm trying to implement these on php but after a long googling, still not able to get better information.
1. Procedural packages
function(main(myVar)
{
var mylocalVar="I'm a variable";
function(subA(){ expr.... };
function(subB(){ expr...},
}
main("php")->subA()
I can do this approach in other language but I'm not able to do it in php.. Any other equivalent solution?
2. How can I overwrite, append, insert, delete an existing modular function (like question 1).
append -> means just add sub function to the existing function, and always become part of the function
insert -> you can insert a function in a collection of a function, (usage might be on re-ordering the action)
delete -> delete/disable a function in a collection of a function
I'm trying to make my codes dynamic and flexible as much as possible so I can plug any function that I want.
Thank you in advance.