public function setTriggerType($type)
    {
        if (!array_key_exists($type, $this->validTypes)) {
            throw new \InvalidArgumentException('The type MUST be one of:' . implode(',', $this->validTypes));
        }

        $this->type = $this->validTypes[$type];
        $this->typeAlias = $type;
    }