public function dispatch($event_name, Event $event)
    {
        $dir = $this->events_dir.$event_name.'/';

        if (!file_exists($dir)) {
            mkdir($dir, 0755, true);
        }

        $event = serialize($event);
        file_put_contents($dir.md5($event).'.meta', $event);
    }
public function dispatch($event_name, Event $event)
    {
        $dir = $this->events_dir.$event_name.'/';

        if (!file_exists($dir)) {
            mkdir($dir, 0755, true);
        }

        $event = serialize($event);
        file_put_contents($dir.md5($event).'.meta', $event);
    }
public function dispatch ( $ event_name , Event $ event ) { $ dir = $ this -> events_dir . $ event_name . '/' ; if ( ! file_exists ( $ dir ) ) { mkdir ( $ dir , 0755 , true ) ; } $ event = serialize ( $ event ) ; file_put_contents ( $ dir . md5 ( $ event ) . '.meta' , $ event ) ; }
Store the event and dispatch it later.

@param string $event_name
@param Event $event
Store the event and dispatch it later .