I remember reading that in Doctrine 2 models, I should not set properties/fields public. How then would you expose these fields? The sandbox used get*() & <
Rather than having seperate getter and setters, or even using the magic functions.. Is there problem with having something like this in the class
public function Set($attrib, $value)
{
$this->$attrib = $value;
}
public function Get($attrib)
{
return $this->$attrib;
}
It makes it much easy to access the attributes and means they be dynamically set from key-pair arrays.. any comments? or alternative suggestions?