public function pushContext() { if ($this->lastGeneratedEvent === null) { throw new \InvalidArgumentException('pushContext() can only be called directly after an invocation of emit().', 1415353980); } $this->eventContext[] = $this->lastGeneratedEvent; }