<?php
class ChairmanEventDispatcher {
    private $events = array();

    public function dispatch($name, array $payload=array()) {
        $this->events[] = array(
            'name'=>$name,
            'payload'=>$payload,
            'time'=>date('c')
        );
    }

    public function all() {
        return $this->events;
    }
}
