1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465 |
- <?php
- namespace crmeb\basic;
- use think\facade\Config;
- abstract class BaseSms extends BaseStorage
- {
-
- protected $templateIds = [];
-
- protected function initialize(array $config)
- {
- $this->templateIds = Config::get($this->configFile . '.stores.' . $this->name . '.template_id', []);
- }
-
- public function getTemplateId()
- {
- return $this->templateIds;
- }
-
- protected function getTemplateCode(string $templateId)
- {
- return $this->templateIds[$templateId] ?? null;
- }
-
- abstract public function send(string $phone, string $templateId, array $data = []);
- }
|