work/extend/sms/submail/lib/messagetemplateget.php
2019-01-17 11:05:47 +08:00

28 lines
748 B
PHP

<?PHP
class MESSAGETemplateGET{
protected $configs;
protected $template_id='';
function __construct($configs){
$this->configs=$configs;
}
public function SetTemplate($template_id){
$this->template_id=trim($template_id);
}
public function buildRequest(){
$request=array();
if(!empty($this->template_id)){
$request['template_id']=$this->template_id;
}
return $request;
}
public function getTemplate(){
$message=new message($this->configs);
return $message->getTemplate($this->buildRequest());
}
}