On Fri, Apr 18, 2008 at 2:28 PM, Robert Cummings <[EMAIL PROTECTED]>
wrote:
>
> On Fri, 2008-04-18 at 13:54 -0600, Nathan Nobbe wrote:
> > On Fri, Apr 18, 2008 at 1:42 PM, Robert Cummings <[EMAIL PROTECTED]>
> > wrote:
> >
> > > Nope, the point is moot. If I've made my properties publicly
> access
On Fri, 2008-04-18 at 13:54 -0600, Nathan Nobbe wrote:
> On Fri, Apr 18, 2008 at 1:42 PM, Robert Cummings <[EMAIL PROTECTED]>
> wrote:
>
> > Nope, the point is moot. If I've made my properties publicly accessible,
> > now, due to the ability to trap via __get() or __set(), I can remove
> > them a
On Fri, Apr 18, 2008 at 1:42 PM, Robert Cummings <[EMAIL PROTECTED]>
wrote:
> Nope, the point is moot. If I've made my properties publicly accessible,
> now, due to the ability to trap via __get() or __set(), I can remove
> them and handle them. Thus, I can retrospectively change the semantics
> w
On Fri, 2008-04-18 at 13:17 -0600, Nathan Nobbe wrote:
> On Fri, Apr 18, 2008 at 1:02 PM, Robert Cummings <[EMAIL PROTECTED]>
> wrote:
>
> > What he means is don't ask for the data literally (by property name) ask
> > for it via a method. This allows wrapping the data in "work". This is a
> > moo
On Fri, Apr 18, 2008 at 1:02 PM, Robert Cummings <[EMAIL PROTECTED]>
wrote:
> What he means is don't ask for the data literally (by property name) ask
> for it via a method. This allows wrapping the data in "work". This is a
> moot issue in PHP since PHP allows trapping the property accessor.
i
On Fri, Apr 18, 2008 at 12:50 PM, Jim Lucas <[EMAIL PROTECTED]> wrote:
>
> Let me quote, you said this: "Is no different than" You are wrong, in
> fact it IS different. Having your own custom methods to get or set data
> allows you to have more control over what data is injected into your object
On Fri, 2008-04-18 at 11:50 -0700, Jim Lucas wrote:
> Nick Stinemates wrote:
> >>> Data Hiding IS Encapsulation.
> >>> But, you have to agree,
> >>> >>> class Lol {
> >>> private $bar;
> >>> public function getBar() { return $bar }
> >>> public function setBar($bar) { $this->bar = $bar}
> >>>
Nick Stinemates wrote:
Data Hiding IS Encapsulation.
But, you have to agree,
bar = $bar}
}
?>
Is no different than:
Here's a more thought out argument from
http://www.javaworld.com/javaworld/jw-09-2003/jw-0905-toolbox.html :
A fundamental precept of OO systems is that an object should not expos
On Fri, Apr 18, 2008 at 11:50 AM, Nick Stinemates <[EMAIL PROTECTED]>
wrote:
> That's a relatively narrow minded response to my point, since I gave
> a pretty concrete example of exactly what I meant,
no, its a very valid criticism of your flawed example. you supply a
definition of encapsulatio
On Fri, Apr 18, 2008 at 11:21 AM, Nick Stinemates <[EMAIL PROTECTED]>
wrote:
> On Fri, Apr 18, 2008 at 10:25:29AM -0600, Nathan Nobbe wrote:
> > On Thu, Apr 17, 2008 at 5:43 PM, Nick Stinemates <[EMAIL PROTECTED]>
> > wrote:
> >
> > > On Thu, Apr 17, 2008 at 10:05:11AM +0200, Michael Preminger wro
>> Data Hiding IS Encapsulation.
>> But, you have to agree,
>> > class Lol {
>> private $bar;
>> public function getBar() { return $bar }
>> public function setBar($bar) { $this->bar = $bar}
>> }
>> ?>
>> Is no different than:
>> > class Lol {
>> public $bar;
>> }
>> ?>
>> Here's a more thought
Nick Stinemates wrote:
On Fri, Apr 18, 2008 at 10:25:29AM -0600, Nathan Nobbe wrote:
On Thu, Apr 17, 2008 at 5:43 PM, Nick Stinemates <[EMAIL PROTECTED]>
wrote:
On Thu, Apr 17, 2008 at 10:05:11AM +0200, Michael Preminger wrote:
Hello!
Seems that PHP gets more and more object oriented, which
On Fri, Apr 18, 2008 at 10:25:29AM -0600, Nathan Nobbe wrote:
> On Thu, Apr 17, 2008 at 5:43 PM, Nick Stinemates <[EMAIL PROTECTED]>
> wrote:
>
> > On Thu, Apr 17, 2008 at 10:05:11AM +0200, Michael Preminger wrote:
> > > Hello!
> > >
> > > Seems that PHP gets more and more object oriented, which i
On Thu, Apr 17, 2008 at 5:43 PM, Nick Stinemates <[EMAIL PROTECTED]>
wrote:
> On Thu, Apr 17, 2008 at 10:05:11AM +0200, Michael Preminger wrote:
> > Hello!
> >
> > Seems that PHP gets more and more object oriented, which is good.
> >
> > I am now running a course in PHP, using PHP 5, where we are
On Thu, Apr 17, 2008 at 10:05:11AM +0200, Michael Preminger wrote:
> Hello!
>
> Seems that PHP gets more and more object oriented, which is good.
>
> I am now running a course in PHP, using PHP 5, where we are going to
> use the *DOM* interface. I am trying to teach them good OO practices,
> meanin
Hello!
Seems that PHP gets more and more object oriented, which is good.
I am now running a course in PHP, using PHP 5, where we are going to
use the *DOM* interface. I am trying to teach them good OO practices,
meaning that we insistently hide properties and expose them as get or
set methods.
16 matches
Mail list logo