x-one / smsplanet-notifier-bundle
There is no license information available for the latest version (v1.0.0) of this package.
Integrates SMSPLANET provider with Symfony Notifier
Package info
bitbucket.org/majchw/smsplanet-notifier-bundle/
Type:symfony-bundle
pkg:composer/x-one/smsplanet-notifier-bundle
v1.0.0
2023-11-14 09:30 UTC
Requires
- php: ^8.1
- symfony/framework-bundle: ^6.2
- symfony/http-client: ^6.2
- symfony/notifier: ^6.2
- symfony/property-access: ^6.2
Requires (Dev)
- symfony/mailer: ^6.2
- symfony/mime: ^6.2
- symfony/phpunit-bridge: ^6.2
This package is auto-updated.
Last update: 2026-03-14 18:25:23 UTC
README
Provides SMSPLANET integration for Symfony Notifier.
composer require x-one/smsplanet-notifier-bundle
DSN example
SMSPLANET_DSN=smsplanet://KEY:PASSWORD@default?from=FROM&test=TEST
where:
KEYis your API key (token)PASSWORDis your API passwordTESTsetting this parameter to "1" (default "0") will result in sending message in test mode (message is validated, but not sent)
See your account info at https://panel.smsplanet.pl/.
Adding options to a message
You can use the SmsplanetOptions class to add message options:
use Symfony\Component\Notifier\Message\SmsMessage;
use Symfony\Component\Notifier\TexterInterface;
use XOne\Bundle\NotifierBundle\SmsplanetOptions;
$sms = new SmsMessage('+4811111111', 'My message');
$options = (new SmsplanetOptions())
->date((new DateTime())->modify('+1 hour'))
->name('Start systemu')
->clearPolish(true)
->param1(['Jan', 'Zbigniew', 'Jerzy'])
->param2(['Kowalski', 'Nowak', 'Wiśniewski'])
->param3(['54-152', '43-190', '60-118'])
->param4(['Wrocław', 'Mikołów', 'Poznań'])
->companyId('A005')
->transactional(true)
;
// Add the custom options to the sms message and send the message
$sms->options($options);
/**
* @var TexterInterface $texter
*/
$texter->send($sms);