Yeah this is definitely going to be fixed (partially fixed already in CVS)
where you'll get a "You idiot" message if you try and use access modifiers :)
I thought there was another bug you pointed out in your code but I might be
wrong. Can't remember.
Thanks,
Andi
At 10:07 PM 10/13/2004 +0200,
On Tue, 2004-10-12 at 00:09, Andi Gutmans wrote:
> What do you expect to happen?
I expected it to work: Either give me a compile error ("You idiot! Why
are you using method modifiers in an interface?") or not complain and
let me code improper OO. The problem is the the confusing message.
Btw, the
Interfaces describe how to talk to objects (or endpoints, if you're in
to RPC) and so always have an instance (or handle) to talk to. Since
static methods have no instance, they have no meaning in the context
of interfaces--there is nothing to talk to.
IMO.
I'm +1 for simplicity here :-)
--Wez
At 02:46 PM 10/12/2004 +0200, Jochem Maas wrote:
Wez Furlong wrote:
An interface is a *public* contract by definition; PPP specifiers just
don't make sense there.
out of curiosity:
would that be a definition at the PHP level (i.e. decided by php-devs) or
is that definition more widely acknowledged
Hi Jason,
Thanks for the info.
I understand how the definition of 'interface' lead logically to
the conclusion that it must be public - I was theorizing a situation
where an interface could be used accross a 'classtree'* in a protected
manner (which could conceptually be seen as as public interfa
--- Begin Message ---
Jochem Maas wrote:
Wez
Furlong wrote:
An interface is a *public* contract by
definition; PPP specifiers just
don't make sense there.
out of curiosity:
would that be a definition at the PHP level (i.e. decided by php-devs)
or is that definition m
Wez Furlong wrote:
An interface is a *public* contract by definition; PPP specifiers just
don't make sense there.
out of curiosity:
would that be a definition at the PHP level (i.e. decided by php-devs)
or is that definition more widely acknowledged (for want of a better
word) (e.g. php-devs used
An interface is a *public* contract by definition; PPP specifiers just
don't make sense there.
Neither does static, since interfaces are instance based.
--Wez.
On Tue, 12 Oct 2004 09:34:00 +0200, Jochem Maas <[EMAIL PROTECTED]> wrote:
> I would be very grateful if you could explain the logic beh
Marcus, thanks for the heads ups.
I actually did have a (convoluted) example of using protected/private on
interface methods, but reading your explaination makes it clear that
there is a Better Way(tm).
static in interfaces does indeed seem valid: I hope that finds its way
into 'the fold'.
kin
Andi Gutmans wrote:
What do you expect to happen?
BTW, I see an additional problem. You aren't supposed to be able to use
access modifiers such as public/abstract in an interface definition.
This is something we have to fix.
It should be:
interface Drawable {
function draw();
}
I would be
What do you expect to happen?
BTW, I see an additional problem. You aren't supposed to be able to use
access modifiers such as public/abstract in an interface definition. This
is something we have to fix.
It should be:
interface Drawable {
function draw();
}
Andi
At 03:26 PM 10/9/2004 +02
On Sat, 2004-10-09 at 15:26, Timm Friebe wrote:
> Hi,
> the attached script produces:
[...Error message...]
- if (parent->common.fn_flags & ZEND_ACC_ABSTRACT
+ if (!(parent->common.scope->ce_flags & ZEND_ACC_INTERFACE)
+ && parent->common.fn_flags & ZEND_ACC_ABSTRACT
fix
Hi,
the attached script produces:
Fatal error: Can't inherit abstract function Drawable::draw()
(previously declared abstract in Figure) in /usr/home/thekid/r.php on
line 12
which is wrong because I am not inheriting anything but implementing an
interface.
The problem is that both zend_do_inheri
13 matches
Mail list logo