http://pastie.org/931617 is a link to the source code. If there is a better way to do this, let me know.
One thing I’m unsure about, is the way I handle child/parent constructs in the validation classes towards the bottom.
Thanks.
Ok, I took your advice using an associative array. Now, I just toss the $_POST variable to my construct. How does this look – http://pastie.org/931715
You handle constructs correct.
Very long lists of arguments are good in strongly typed languages such as C++, but are not very convenient and safe for PHP. My advice is to use associative arrays.
Usage:
Your benefits:
You do not need to remember exact order of arguments. Create array of args in any order. Less bugs. Less typing.
Some arguments may be empty, so no need to send them. Better performance.