Initial commit: CloudOps infrastructure platform
This commit is contained in:
@@ -0,0 +1,64 @@
|
||||
<?php
|
||||
|
||||
namespace Mautic\SmsBundle\Event;
|
||||
|
||||
use Mautic\LeadBundle\Entity\Lead;
|
||||
use Mautic\LeadBundle\Entity\LeadEventLog;
|
||||
use Symfony\Component\HttpFoundation\Response;
|
||||
|
||||
class ReplyEvent extends \Symfony\Contracts\EventDispatcher\Event
|
||||
{
|
||||
private ?Response $response = null;
|
||||
|
||||
private ?LeadEventLog $eventLog = null;
|
||||
|
||||
/**
|
||||
* ReplyEvent constructor.
|
||||
*
|
||||
* @param string $message
|
||||
*/
|
||||
public function __construct(
|
||||
private Lead $contact,
|
||||
private $message,
|
||||
) {
|
||||
}
|
||||
|
||||
/**
|
||||
* @return Lead
|
||||
*/
|
||||
public function getContact()
|
||||
{
|
||||
return $this->contact;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getMessage()
|
||||
{
|
||||
return $this->message;
|
||||
}
|
||||
|
||||
public function setResponse(Response $response): void
|
||||
{
|
||||
$this->response = $response;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return Response|null
|
||||
*/
|
||||
public function getResponse()
|
||||
{
|
||||
return $this->response;
|
||||
}
|
||||
|
||||
public function getEventLog(): ?LeadEventLog
|
||||
{
|
||||
return $this->eventLog;
|
||||
}
|
||||
|
||||
public function setEventLog(LeadEventLog $eventLog): void
|
||||
{
|
||||
$this->eventLog = $eventLog;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
<?php
|
||||
|
||||
namespace Mautic\SmsBundle\Event;
|
||||
|
||||
use Mautic\CoreBundle\Event\CommonEvent;
|
||||
use Mautic\SmsBundle\Entity\Sms;
|
||||
|
||||
class SmsEvent extends CommonEvent
|
||||
{
|
||||
/**
|
||||
* @param bool $isNew
|
||||
*/
|
||||
public function __construct(Sms $sms, $isNew = false)
|
||||
{
|
||||
$this->entity = $sms;
|
||||
$this->isNew = $isNew;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the Sms entity.
|
||||
*
|
||||
* @return Sms
|
||||
*/
|
||||
public function getSms()
|
||||
{
|
||||
return $this->entity;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the Sms entity.
|
||||
*/
|
||||
public function setSms(Sms $sms): void
|
||||
{
|
||||
$this->entity = $sms;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,71 @@
|
||||
<?php
|
||||
|
||||
namespace Mautic\SmsBundle\Event;
|
||||
|
||||
use Mautic\CoreBundle\Event\CommonEvent;
|
||||
use Mautic\LeadBundle\Entity\Lead;
|
||||
|
||||
class SmsSendEvent extends CommonEvent
|
||||
{
|
||||
/**
|
||||
* @var int
|
||||
*/
|
||||
protected $smsId;
|
||||
|
||||
/**
|
||||
* @param string $content
|
||||
*/
|
||||
public function __construct(
|
||||
protected $content,
|
||||
protected Lead $lead,
|
||||
) {
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getContent()
|
||||
{
|
||||
return $this->content;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $content
|
||||
*/
|
||||
public function setContent($content): void
|
||||
{
|
||||
$this->content = $content;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return Lead
|
||||
*/
|
||||
public function getLead()
|
||||
{
|
||||
return $this->lead;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param Lead $lead
|
||||
*/
|
||||
public function setLead($lead): void
|
||||
{
|
||||
$this->lead = $lead;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return int
|
||||
*/
|
||||
public function getSmsId()
|
||||
{
|
||||
return $this->smsId;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $smsId
|
||||
*/
|
||||
public function setSmsId($smsId): void
|
||||
{
|
||||
$this->smsId = $smsId;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
<?php
|
||||
|
||||
namespace Mautic\SmsBundle\Event;
|
||||
|
||||
use Symfony\Contracts\EventDispatcher\Event;
|
||||
|
||||
class TokensBuildEvent extends Event
|
||||
{
|
||||
/**
|
||||
* @param array<string,array<int|string>> $tokens
|
||||
*/
|
||||
public function __construct(private array $tokens)
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array<string,array<int|string>>
|
||||
*/
|
||||
public function getTokens(): array
|
||||
{
|
||||
return $this->tokens;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param array<string,array<int|string>> $tokens
|
||||
*/
|
||||
public function setTokens($tokens): void
|
||||
{
|
||||
$this->tokens = $tokens;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user