I have a form with several sections each one enabled by a checkbox allowing input of parameters. When this form is submitted I want to call a class object with only the class functions called that have the checkbox enabled.
$variable = new Thumbnail($source,$_POST['maxwidth'],$_POST['maxheight'],$tsource,$_POST['JpegCompression'],'
"bevel('.$_POST['BevelEdgeWidth'].','.$_POST['BevelHexLtColor'].','.$_POST['BevelHexDkColor'].')",
"greyscale('.$_POST['GreyScaleIntRed'].','.$_POST['GreyScaleIntGreen'].','.$_POST['GreyScaleIntBlue'].')",
"ellipse('.$_POST['EllipseHexBkColor'].')",
"merge('.$_POST['MergeImagePath'].','.$_POST['MergeXstart'].','.$_POST['MergeYstart'].','.$_POST['MergeOpacity'].','.$_POST['MergeTransColor'].')",
"frame('.$_POST['FrameHexLtColor'].','.$_POST['FrameHexDkColor'].','.$_POST['FrameIntWidthMidBit'].')",
"drop_shadow('.$_POST['DropShadowWidth'].','.$_POST['DropShadowColor'].','.$_POST['DropShadowBkColor'].')",
"motion_blur('.$_POST['MotionBlurNumLines'].','.$_POST['MotionBlurHexBkColor'].')",
"round_edges('.$_POST['RoundEdgeRadius'].','.$_POST['RoundEdgeBkColor'].','.$_POST['RoundEdgeAntiAlias'].')"');
So if only the Bevel checkbox is enabled I only want to call the class bevel function and if several checkboxes are enabled I want to call those class functions.
It's having the functions in the class that's throwing me.
What is the best way to conditionally call class functions?
Thanks
Frank