I need to implement an observer design pattern in PHP. The problem with the standard SplObserver interface is that its update(SplSubject $subject) method doesn't support supplying additional arguments which is necessary for me.
Do I have to create my own interface like this?
interface PushObserver {
public function update($sender, array $pushData);
}
Or is there a more standard way which wouldn't require users of my class to implement my own interface? I know I am not the only one dealing with this, but I haven't found a single article about this issue.