ldc-dam/app/Events/MediaSearched.php

123 lines
2.1 KiB
PHP
Raw Permalink Normal View History

<?php
namespace App\Events;
use App\Models\Sujet;
use App\Models\User;
use Illuminate\Foundation\Events\Dispatchable;
use Illuminate\Queue\SerializesModels;
class MediaSearched
{
use Dispatchable;
use SerializesModels;
/**
* The user who created the media
*
* @var \App\Models\User
*/
private $user;
/**
* The sujet
*
* @var \App\Models\Sujet
*/
private $sujet;
/**
* The searchString
*
* @var string
*/
private $searchString;
/**
* The filters
*
* @var object
*/
private $filters;
/**
* The dossier_id
*
* @var integer
*/
private $dossier_id;
/**
* Create a new event instance.
*
* @param \App\Models\User $user
* @param \App\Models\Sujet $sujet
* @param string $searchString
* @param object $filters
* @param integer $dossier_id
*/
public function __construct(
User $user,
Sujet $sujet,
string $searchString,
object $filters,
int $dossier_id
) {
$this->user = $user;
$this->sujet = $sujet;
$this->searchString = $searchString;
$this->filters = $filters;
$this->dossier_id = $dossier_id;
}
/**
* Get User who triggered the event
*
* @return \App\Models\User
*/
public function getUser(): User
{
return $this->user;
}
/**
* Get the sujet
*
* @return \App\Models\Sujet
*/
public function getSujet(): Sujet
{
return $this->sujet;
}
/**
* Get the searchString
*
* @return string
*/
public function getSearchString(): string
{
return $this->searchString;
}
/**
* Get the filters
*
* @return string
*/
public function getFilters(): object
{
return $this->filters;
}
/**
* Get the dossier_id
*
* @return integer
*/
public function getDossierId(): int
{
return $this->dossier_id;
}
}