event = $event; $this->tag = $tag; $this->beforeTag = $beforeTag; } /** * @return string * @since 9.0.0 */ public function getEvent(): string { return $this->event; } /** * @return ISystemTag * @since 9.0.0 */ public function getTag(): ISystemTag { return $this->tag; } /** * @return ISystemTag * @since 9.0.0 * @throws \BadMethodCallException */ public function getTagBefore(): ISystemTag { if ($this->event !== self::EVENT_UPDATE) { throw new \BadMethodCallException('getTagBefore is only available on the update Event'); } return $this->beforeTag; } }