2010/1/22 Jochem Maas :
> defined()
Sits.
Ponders.
Find's gun.
Shoots self!
--
-
Richard Quadling
"Standing on the shoulders of some very clever giants!"
EE : http://www.experts-exchange.com/M_248814.html
EE4Free : http://www.experts-exchange.com/becomeAnExpert.jsp
Zend Certified Engin
Op 1/22/10 5:19 PM, Richard Quadling schreef:
> 2010/1/22 Jochem Maas :
>> constants in interfaces are not meant for this. a class constant doesn't
>> constitute an interface. I believe constants in interfaces are allowed purely
>> because it is helpful to have them defined outside of the global sp
2010/1/22 Ashley Sheridan
> Constants are there for things that should never change. If you ever need to
> change them, then whoever created the base class either didn't think things
> through properly, or you're not. Imagine a class that sets the value of π
> (as is the erstwhile example for
2010/1/22 Jochem Maas :
> constants in interfaces are not meant for this. a class constant doesn't
> constitute an interface. I believe constants in interfaces are allowed purely
> because it is helpful to have them defined outside of the global space and
> somewhere where all implementors of said
Op 1/22/10 4:55 PM, Richard Quadling schreef:
> 2010/1/22 Ashley Sheridan
>> Constants are there for things that should never change. If you ever need to
>> change them, then whoever created the base class either didn't think things
>> through properly, or you're not. Imagine a class that sets
2010/1/22 Darren Karstens :
> One way to do it would be to use getter functions in your interface
> that return the value of the constant (or a member variable) in your
> implemented class. For example:
>
> interface SetKillSwitch {
> public function getKillSwitchNotes();
> }
>
> Then in your
On Fri, 2010-01-22 at 11:33 +, Richard Quadling wrote:
> Hello,
>
> One of the aspects of an interface is to enforce a public view of a
> class (as I see it).
>
> Within PHP, interfaces are allowed to have constants, but you cannot
> override them in a class implementing that interface.
>
>
One way to do it would be to use getter functions in your interface
that return the value of the constant (or a member variable) in your
implemented class. For example:
interface SetKillSwitch {
public function getKillSwitchNotes();
}
Then in your class implement your getKillSwitchNotes fu
Hello,
One of the aspects of an interface is to enforce a public view of a
class (as I see it).
Within PHP, interfaces are allowed to have constants, but you cannot
override them in a class implementing that interface.
This seems wrong.
The interface shouldn't define the value, just like it doe
9 matches
Mail list logo