2022-06-27 15:55:35 +02:00
|
|
|
<?php
|
|
|
|
|
|
|
|
declare(strict_types=1);
|
|
|
|
|
|
|
|
namespace D3\LinkmobilityClient\ValueObject;
|
|
|
|
|
2022-07-01 09:24:16 +02:00
|
|
|
use InvalidArgumentException;
|
2022-06-27 15:55:35 +02:00
|
|
|
use Phlib\SmsLength\SmsLength;
|
|
|
|
|
|
|
|
class SmsTextMessage extends SmsMessageAbstract
|
|
|
|
{
|
|
|
|
/**
|
|
|
|
* @param string $message
|
2022-07-01 09:24:16 +02:00
|
|
|
* @throws InvalidArgumentException
|
2022-06-27 15:55:35 +02:00
|
|
|
*/
|
|
|
|
public function __construct(string $message)
|
|
|
|
{
|
|
|
|
parent::__construct( $message);
|
|
|
|
|
|
|
|
$smsLength = new SmsLength($this->value);
|
|
|
|
$smsLength->validate();
|
|
|
|
}
|
|
|
|
}
|