type = $type; return $this; } public function getType(): string { return $this->type; } public function setCollection(Document $collection): self { $this->collection = $collection; return $this; } public function getCollection(): Document { return $this->collection; } public function setDocument(Document $document): self { $this->document = $document; return $this; } public function getDocument(): Document { return $this->document; } public function trigger(): string|bool { return Resque::enqueue($this->queue, $this->class, [ 'project' => $this->project, 'user' => $this->user, 'type' => $this->type, 'collection' => $this->collection, 'document' => $this->document, 'events' => Event::generateEvents($this->getEvent(), $this->getParams()) ]); } }