-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
dic(conf): triggers started #205
base: main
Are you sure you want to change the base?
Conversation
Guikingone
commented
Nov 9, 2021
•
edited
Loading
edited
Q | A |
---|---|
PHP version? | 7.4 |
Bundle version? | 0.8.0 |
Symfony version? | >= 5.2 |
New feature? | yes |
Bug fix? | yes |
Discussion? | # ... |
/** | ||
* @var TriggerConfigurationInterface[] | ||
*/ | ||
private iterable $configurationList; | ||
|
||
/** | ||
* @param TriggerConfigurationInterface[] $configurationList | ||
*/ | ||
public function __construct(iterable $configurationList) | ||
{ | ||
$this->configurationList = $configurationList; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/** | |
* @var TriggerConfigurationInterface[] | |
*/ | |
private iterable $configurationList; | |
/** | |
* @param TriggerConfigurationInterface[] $configurationList | |
*/ | |
public function __construct(iterable $configurationList) | |
{ | |
$this->configurationList = $configurationList; | |
} | |
/** | |
* @param TriggerConfigurationInterface[] $configurationList | |
*/ | |
public function __construct(private iterable $configurationList) | |
{ | |
} |
private bool $enabled; | ||
private int $failureTriggeredAt; | ||
private int $successTriggeredAt; | ||
private ?string $failureFrom; | ||
private ?string $successFrom; | ||
private ?string $failureTo; | ||
private ?string $successTo; | ||
private string $failureSubject; | ||
private string $successSubject; | ||
|
||
public function __construct( | ||
bool $enabled, | ||
int $failureTriggeredAt, | ||
int $successTriggeredAt, | ||
string $failureSubject, | ||
string $successSubject, | ||
?string $failureFrom = null, | ||
?string $successFrom = null, | ||
?string $failureTo = null, | ||
?string $successTo = null | ||
) { | ||
$this->enabled = $enabled; | ||
$this->failureTriggeredAt = $failureTriggeredAt; | ||
$this->successTriggeredAt = $successTriggeredAt; | ||
$this->failureFrom = $failureFrom; | ||
$this->successFrom = $successFrom; | ||
$this->failureTo = $failureTo; | ||
$this->successTo = $successTo; | ||
$this->failureSubject = $failureSubject; | ||
$this->successSubject = $successSubject; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
private bool $enabled; | |
private int $failureTriggeredAt; | |
private int $successTriggeredAt; | |
private ?string $failureFrom; | |
private ?string $successFrom; | |
private ?string $failureTo; | |
private ?string $successTo; | |
private string $failureSubject; | |
private string $successSubject; | |
public function __construct( | |
bool $enabled, | |
int $failureTriggeredAt, | |
int $successTriggeredAt, | |
string $failureSubject, | |
string $successSubject, | |
?string $failureFrom = null, | |
?string $successFrom = null, | |
?string $failureTo = null, | |
?string $successTo = null | |
) { | |
$this->enabled = $enabled; | |
$this->failureTriggeredAt = $failureTriggeredAt; | |
$this->successTriggeredAt = $successTriggeredAt; | |
$this->failureFrom = $failureFrom; | |
$this->successFrom = $successFrom; | |
$this->failureTo = $failureTo; | |
$this->successTo = $successTo; | |
$this->failureSubject = $failureSubject; | |
$this->successSubject = $successSubject; | |
} | |
public function __construct( | |
private bool $enabled, | |
private int $failureTriggeredAt, | |
private int $successTriggeredAt, | |
private string $failureSubject, | |
private string $successSubject, | |
private ?string $failureFrom = null, | |
private ?string $successFrom = null, | |
private ?string $failureTo = null, | |
private ?string $successTo = null | |
) { | |
} |
private TaskListInterface $failedTasksList; | ||
private TaskListInterface $succeedTasksList; | ||
private ?MailerInterface $mailer; | ||
private EmailTriggerConfiguration $emailTriggerConfiguration; | ||
|
||
public function __construct( | ||
EmailTriggerConfiguration $emailTriggerConfiguration, | ||
?MailerInterface $mailer = null | ||
) { | ||
$this->emailTriggerConfiguration = $emailTriggerConfiguration; | ||
$this->mailer = $mailer; | ||
|
||
$this->failedTasksList = new TaskList(); | ||
$this->succeedTasksList = new TaskList(); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
private TaskListInterface $failedTasksList; | |
private TaskListInterface $succeedTasksList; | |
private ?MailerInterface $mailer; | |
private EmailTriggerConfiguration $emailTriggerConfiguration; | |
public function __construct( | |
EmailTriggerConfiguration $emailTriggerConfiguration, | |
?MailerInterface $mailer = null | |
) { | |
$this->emailTriggerConfiguration = $emailTriggerConfiguration; | |
$this->mailer = $mailer; | |
$this->failedTasksList = new TaskList(); | |
$this->succeedTasksList = new TaskList(); | |
} | |
private TaskListInterface $failedTasksList; | |
private TaskListInterface $succeedTasksList; | |
public function __construct( | |
private EmailTriggerConfiguration $emailTriggerConfiguration, | |
private ?MailerInterface $mailer = null | |
) { | |
$this->failedTasksList = new TaskList(); | |
$this->succeedTasksList = new TaskList(); | |
} |
private EventDispatcherInterface $eventDispatcher; | ||
private LoggerInterface $logger; | ||
private TriggerConfigurationRegistryInterface $triggerConfigurationRegistry; | ||
private ?MailerInterface $mailer; | ||
|
||
public function __construct( | ||
EventDispatcherInterface $eventDispatcher, | ||
TriggerConfigurationRegistryInterface $triggerConfigurationRegistry, | ||
?LoggerInterface $logger = null, | ||
?MailerInterface $mailer = null | ||
) { | ||
$this->eventDispatcher = $eventDispatcher; | ||
$this->triggerConfigurationRegistry = $triggerConfigurationRegistry; | ||
$this->logger = $logger ?? new NullLogger(); | ||
|
||
$this->mailer = $mailer; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
private EventDispatcherInterface $eventDispatcher; | |
private LoggerInterface $logger; | |
private TriggerConfigurationRegistryInterface $triggerConfigurationRegistry; | |
private ?MailerInterface $mailer; | |
public function __construct( | |
EventDispatcherInterface $eventDispatcher, | |
TriggerConfigurationRegistryInterface $triggerConfigurationRegistry, | |
?LoggerInterface $logger = null, | |
?MailerInterface $mailer = null | |
) { | |
$this->eventDispatcher = $eventDispatcher; | |
$this->triggerConfigurationRegistry = $triggerConfigurationRegistry; | |
$this->logger = $logger ?? new NullLogger(); | |
$this->mailer = $mailer; | |
public function __construct( | |
private EventDispatcherInterface $eventDispatcher, | |
private TriggerConfigurationRegistryInterface $triggerConfigurationRegistry, | |
?LoggerInterface $logger = null, | |
private ?MailerInterface $mailer = null | |
) { | |
$this->logger = $logger ?? new NullLogger(); |