chrisbryan17's picture
Upload folder using huggingface_hub
d2897cd verified
raw
history blame contribute delete
956 Bytes
<?php
namespace Mautic\WebhookBundle\Event;
use Mautic\CoreBundle\Event\CommonEvent;
use Mautic\WebhookBundle\Entity\Webhook;
class WebhookEvent extends CommonEvent
{
/**
* @var Webhook
*/
protected $entity;
/**
* @param bool $isNew
* @param string $reason
*/
public function __construct(
Webhook $webhook,
protected $isNew = false,
private $reason = ''
) {
$this->entity = $webhook;
}
/**
* Returns the Webhook entity.
*
* @return Webhook
*/
public function getWebhook()
{
return $this->entity;
}
/**
* Sets the Webhook entity.
*/
public function setWebhook(Webhook $webhook): void
{
$this->entity = $webhook;
}
public function setReason($reason): void
{
$this->reason = $reason;
}
public function getReason(): string
{
return $this->reason;
}
}