Re: Re: [PEPr] Comment on RFC::ProtectedMembers

From: Date: Mon, 28 Jun 2004 16:42:48 +0000
Subject: Re: Re: [PEPr] Comment on RFC::ProtectedMembers
References: 1  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-31296@lists.php.net to get a copy of this message
On Mon, 28 Jun 2004 10:50:49 +0200, Bertrand Mansion <bmansion@mamasam.com> wrote: > > Justin Patrin wrote: > > >On Sun, 27 Jun 2004 09:44:48 +0200, Bertrand Mansion > ><bmansion@mamasam.com> wrote: > >> > >> IIRC, you explained in a recent message that, in DataObject, you use the '_' > >> prefix on public variables in order to have them look different from the > >> variables associated with table fields. In a way, you took the liberty not to > >> follow PEAR CS in order to serve your code readability in a way you were > >> thinking would help the end-users. > >> > > > >Actually, I said that and it was for DB_DataObject_FormBuilder, not > >DB_DataObject. The variables are members of DataObjects, but they're > >used by FormBuilder. This is a non-issue anyway as we're planning on > >changing it to fb_ before 1.0 to make it obvious and not confuse them > >with private vars. > > Because of an underscore, you break your API... Well, the API has many inconsistencies and CS blunders, like select_display_field and _crossLinks. Different people have been adding things at different times and it's a mess. We're going to clean it up to conform with CS and be more donsistent. We're at 0.9 beta, so we feel we should do this before we get to 1.0. > So, will you fb_ prefixed variables be private, protected or public ? They will be public as the FormBuilder needs to access them and it is not extended from DataObject. Keeping the info in the DO makes sense as these are DO specific options, but they will only be used by FormBuilder. Technically, they should be protected, but as I said, FormBuilder doesn't extend from DataObject, it wouldn't make sense. > > Bertrand Mansion > Mamasam > > !DSPAM:40dfd9ed247718746316786! > > -- paperCrane --Justin Patrin--

« previous php.pear.dev (#31296) next »