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:
Code:
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