{
        $notification =& $this->_dispatcher->post($this, 'onFoo', 'Some Info...');
        echo "notification::foo is {$notification->foo}\n";
    }
}
/**
 * example observer
 */
class Receiver
{
    public $foo;
    function notify(&$notification)
    {
        echo "Received notification\n";
        echo "Receiver::foo is {$this->foo}\n";
        $notification->foo = 'bar';
    }
}
$dispatcher = Event_Dispatcher::getInstance();
$sender = new Sender($dispatcher);
$receiver = new Receiver();
$receiver->foo = 42;
$lambda = function (&$notification) use($receiver) {
    echo "Function callback called!\n";
    $receiver->notify(&$notification);
};
// make sure you are using an ampersand here!
$dispatcher->addObserver($lambda);
$receiver->foo = 'bar';
echo "Sender->foo()\n";
$sender->foo();