public function add(EventInterface $event)
    {
        $index = $this->computeIndex($event);
        if (isset($this->events[$index])) {
            $this->events[$index][] = $event;
        } else {
            $this->events[$index] = array($event);
        }

        ++$this->count;
    }
public function add(EventInterface $event)
    {
        $index = $this->computeIndex($event);
        if (isset($this->events[$index])) {
            $this->events[$index][] = $event;
        } else {
            $this->events[$index] = array($event);
        }

        ++$this->count;
    }
public function add ( EventInterface $ event ) { $ index = $ this -> computeIndex ( $ event ) ; if ( isset ( $ this -> events [ $ index ] ) ) { $ this -> events [ $ index ] [ ] = $ event ; } else { $ this -> events [ $ index ] = array ( $ event ) ; } ++ $ this -> count ; }
Adds an event to the collection.

@param EventInterface $event
Adds an event to the collection .