[Biophp-dev] SET/GET methods
Serge Gregorio
biophp-dev@bioinformatics.org
Thu, 15 May 2003 12:08:56 +0800
Ah yes, I've wrestled with this problem too. There's nothing
stopping us from introducing methods that SET/GET properties
or attributes of classes. However, keep in mind that there's
nothing stopping the user/developer from SETting/GETting the
properties directly (it's one of PHP 4's OO limitations).
>>SC: For example, right now everyone is expected to directly set
>> $seq->sequence and
>> $seq->moltype directly, which means I can easily accidently
>> $seq->sequence='ZXKUQYB'; $seq->moltype='DNA';
>> whereas if people are able to use a "setSequence()" method, we can >> add auto-detection of the type whenever the sequence is set (and
>> "setMolType()"
>> can check the existing sequence to see if it's valid for that >>type...)
>NS: Right, although it all adds overhead.
Regards,
Serge
Need a new email address that people can remember
Check out the new EudoraMail at
http://www.eudoramail.com