Re: RE:Class::? - accessing data, no success...
| From: | Ulf Wendel | Date: | Tue, 04 Jul 2000 11:48:03 +0000 |
| Subject: | Re: RE:Class::? - accessing data, no success... | ||
| References: | 1 2 3 4 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-23450@lists.php.net to get a copy of this message | ||
waldschrott wrote:
>
> > +++ That's what I want ++++
> >
> > <?php
> > class foo {
> > var $bar = "this one is good";
> >
> > function foo() {
> > print "silly example";
> > }
> > }
>
> > print foo::bar; // static (read-only!) access of a property
> > foo::foo(); // static access of a method
> > ?>
>
> totally agreeing Ulf, I´ve a little communication problem with stas
> (I´ll write everything very exactly now)
>
> *But* I´ve mentionned a problem of ambiguousity calling foo:bar from
> within an object, you *could expect* that accessing a property via
> foo:bar does the same as foo:foo() does (namely accessing an overriden
> property, because foo:foo() accesses an overriden method) - while
> calling foo:bar from outside allows a static call to a property of a
> class, that´s ambiguous
Yes :-). That's why I started the last "::" thread.
> We should define that calls to properties are always static calls and
> nothing strange like a "access overridden,overwritten property*
Yes, that's a simple and good definition.
Ulf
--
Ulf Wendel
NetUSE AG
Siemenswall, D-24107 Kiel, Germany
Fon: +49 431 386435 00 -- Fax: +49 431 386435 99