|
Posted by Vince Morgan on 04/21/07 00:03
"Steve" <no.one@example.com> wrote in message
news:zGbWh.1456$go5.566@newsfe12.lga...
> that's certainly one interpretation where the evidence won't contradict
the
> theory you've arrived upon. however, it is wrong. overloading would mean
> somehow that php knows to what function __set/__get applies. this is not
the
> case. again, the important part is that __set/__get only fire if you try
to
> access a member on an object that does NOT exist in the class.
Yep, no doubt about it. That is exactly what I found, and as my __set()
_did_ set the properties value [as I had told it too] when it was called, I
lost all sense of reason :)
It works exactly as you describe.
> that again
> means that there is no association between php and your defined
interfaces -
> except to say that php gives you a means to detect when someone is trying
to
> muck with your object without going through your defined interfaces...via
> __set/__get. to which your response should be to thow an error.
>
> does that make the distinction more clear?
Yep, no doubt about it.
>
> | So, when you define __set(), and __get(), the engine will only allow you
> to
> | use the 'overloaded' functions on private, or protected interfaces (I'm
> | guessing about protected, I haven't tried them). Therefore, in effect,
> | __get() and __set() __are__ the interfaces in and of themselves.
>
> no. they are a means to let the class know someone is __getting or
__setting
> a property that does not exist in your object's definition.
>
> | An error or warning would be to alert you to the fact that your
> implemented
> | __get() and or __set() are not being utalized by the engine, and it uses
> | it's own native versions.
>
> no.
>
> | Now I understand why I just couldn't grasp what was being meant by
> | 'overload' in the context of these functions.
>
> if that were going on. in php, you can't truly overload. you can extend
and
> replace a function of the base, but this is technically called
'overriding',
> not 'overloading'. :)
>
Yes!! I realy had lost it!
> as it is here, neither of this is going on.
>
> | Sorry about the verbosity, but if I have anything incorrect I'd rather
it
> | not be overlooked ;)
>
> no worries.
>
> | Thank you very much for your patience. My grey putty is slow to take on
> new
> | shapes sometimes, perhaps more than sometimes. :]
>
> i think you appologize too much. :)
>
> we are *all* learners. we'll help eachother along.
>
> cheers.
>
That is actualy very generous of you, no appology forthcoming :)
Navigation:
[Reply to this message]
|