22 lines
327 B
PHP
22 lines
327 B
PHP
<?php
|
|
|
|
namespace App\Service;
|
|
use App\Thrid\Sms\Movider\Movider;
|
|
use App\Thrid\Sms\SmsInterface;
|
|
|
|
class SmsService
|
|
{
|
|
|
|
function sendSmsCode($phone, $code): bool
|
|
{
|
|
return $this->getChannel()->sendSmsCode($phone, $code);
|
|
}
|
|
|
|
function getChannel(): SmsInterface
|
|
{
|
|
return new Movider();
|
|
}
|
|
|
|
|
|
}
|