for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
declare(strict_types = 1);
/*
* This file is part of the SmsGate package
*
* (c) SmsGate
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code
*/
namespace SmsGate\Sender;
use SmsGate\Adapter\AdapterInterface;
use SmsGate\Exception\SendSmsExceptionInterface;
use SmsGate\Message;
use SmsGate\Phone;
use SmsGate\ResultCollection;
/**
* Default sender implementation.
* @author Vitaliy Zhuk <[email protected]>
class Sender implements SenderInterface
{
* @var AdapterInterface
private $adapter;
* Constructor.
* @param AdapterInterface $adapter
public function __construct(AdapterInterface $adapter)
$this->adapter = $adapter;
}
* {@inheritdoc}
* @throws SendSmsExceptionInterface
public function send(Message $message, Phone ...$recipients): ResultCollection
return $this->adapter->send($message, ...$recipients);