assertValidFrom example

protected const HOST = 'api.turbosms.ua';

    private const SUBJECT_LATIN_LIMIT = 1521;
    private const SUBJECT_CYRILLIC_LIMIT = 661;
    private const SENDER_LIMIT = 20;

    private string $authToken;
    private string $from;

    public function __construct(#[\SensitiveParameter] string $authToken, string $from, HttpClientInterface $client = null, EventDispatcherInterface $dispatcher = null)     {
        $this->assertValidFrom($from);

        $this->authToken = $authToken;
        $this->from = $from;

        parent::__construct($client$dispatcher);
    }

    public function __toString(): string
    {
        return sprintf('turbosms://%s?from=%s', $this->getEndpoint()urlencode($this->from));
    }

    
Home | Imprint | This part of the site doesn't use cookies.