2022-03-13 19:32:32 +01:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace App\Core\Event\Task;
|
|
|
|
|
|
|
|
use Symfony\Component\Console\Output\BufferedOutput;
|
|
|
|
use Symfony\Component\DependencyInjection\ParameterBag\ParameterBagInterface;
|
|
|
|
use Symfony\Component\HttpFoundation\InputBag;
|
|
|
|
use Symfony\Contracts\EventDispatcher\Event;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* class TaskRunRequestedEvent.
|
|
|
|
*
|
|
|
|
* @author Simon Vieille <simon@deblan.fr>
|
|
|
|
*/
|
|
|
|
class TaskRunRequestedEvent extends Event
|
|
|
|
{
|
2023-10-12 16:15:07 +02:00
|
|
|
public const RUN_REQUEST_EVENT = 'task_event.run_request';
|
2022-03-13 19:32:32 +01:00
|
|
|
|
2023-10-20 09:44:18 +02:00
|
|
|
public function __construct(
|
|
|
|
protected string $task,
|
|
|
|
protected InputBag $parameters,
|
|
|
|
protected BufferedOutput $output
|
|
|
|
) {
|
2022-03-13 19:32:32 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
public function getTask(): string
|
|
|
|
{
|
|
|
|
return $this->task;
|
|
|
|
}
|
|
|
|
|
|
|
|
public function getParameters(): ParameterBagInterface
|
|
|
|
{
|
|
|
|
return $this->parameters;
|
|
|
|
}
|
|
|
|
|
|
|
|
public function getOutput(): BufferedOutput
|
|
|
|
{
|
|
|
|
return $this->output;
|
|
|
|
}
|
|
|
|
}
|