Sorry, still new to OO.
I'm working with CodeIgniter but this question is basically just PHP OO.
I have a class file with a bunch of functions that do a similar thing:
function blah_method($the_id=null)
{
// if no the_id set, set it to user's default
if(!isset($the_id)){
$the_id = $this->member['the_id'];
}
Now, Instead of doing that on every method in this class, can I set this up in the constructor? so that I can still pass in $the_id explicitly, to overide it but otherwise it always just defaults to $this->member['the_id'];
What's the most elegant way of doing that?