originalTicket = $originalTicket; $this->changedAttributes = $changedAttributes; $this->updatedTicket = $updatedTicket; $this->action = $action; } /** * Public entry point */ public function process() { $classEntity = "App\Ninja\Tickets\Actions\\" . ucfirst(camel_case($this->action)); $handler = new $classEntity(); $handler->fire($this->updatedTicket); } }