Configurators are classes that provides specialized interface for all message types
use BulkGate\Sdk\Country;
use BulkGate\Sdk\MessageSender;
use BulkGate\Sdk\Message\Component\SmsSender;
use BulkGate\Sdk\Configurator\{SmsConfigurator, SmsCountryConfigurator, ViberConfigurator}
This particular configurator provides methods for setting all sender types
$message = new Sms('420777777777', 'text_message');
$sms_configurator = new SmsConfigurator();
$sms_configurator->textSender('BulkGate');
$sms_configurator->configure($message);
$sms_configurator->numericSender('420777777777');
$sms_configurator->configure($message);
$sms_configurator->shortCode();
$sms_configurator->configure($message);
$sms_configurator->systemNumber();
$sms_configurator->configure($message);
$sms_configurator->mobileConnect('key');
$sms_configurator->configure($message);
$sms_configurator->portalProfile(12);
$sms_configurator->configure($message);
$message = new Sms('420777777777', 'text_message');
$sms_configurator->unicode();
$sms_configurator->configure($message);
This configurator allows you configure specific SMS routes per country.
$message = new Sms('420777777777', 'text_message');
$country_configurator = new SmsCountryConfigurator();
$country_configurator->addCountry(Country::CZECH_REPUBLIC, SmsSender::GATE2, 'BulkGate');
$country_configurator->configure($message);
Viber configurator is a class that provides methods to configure all aspect of Viber message including buttons, images and expiration times
$viber_message = new Viber('420777777777');
$viber_configurator = new ViberConfigurator('Sender');
$viber_configurator->button('caption', 'url');
$viber_configurator->image('url');
$viber_configurator->expiration(5_000 /*seconds*/);
$viber_configurator->configure($viber_message);
$viber_configurator = new ViberConfigurator('Sender');
$sender = new MessageSender($connection);
$sender->addSenderConfigurator($viber_configurator);
You can register only one configurator per message channel. One for Viber and one for SMS.