View Single Post
  #1 (permalink)  
Old February 8th, 2005, 08:11 AM
Norm 2782 Norm 2782 is offline
Registered User
Join Date: Feb 2005
Location: , , .
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to Norm 2782
Default [CH04] Interfaces

I just got to chapter 4 and got to the abstract_widget.php file.
It returned the following error:

Fatal error: Declaration of Widget::update() must be compatible with that of Observer::update() in C:\server\www\prophp\ch04\abstract_widget.php on line 6

I solved it by replacing the interface used in the example by the following one:

interface Observer {
    public function update(Observable $observable);
Is this 'legit' user of interfaces? Or is this a dirty solution to a (maybe very simple) problem?

Norm 2782, why are you here?
- Normality