templatedemailcommunication.phpm

来自「Professional PHP5 code for this book」· PHPM 代码 · 共 22 行

PHPM
22
字号
<?class TemplatedEmailCommunication extends EmailCommunication {    private $path_to_template_file;  private $objSmarty;    public function __construct($strPathToTemplateFile) {    $this->objSmarty = new Smarty;    $this->path_to_template_file = $strPathToTemplateFile;    parent::__construct();  }    public function setParameter($strParameter, $strValue) {    $this->objSmarty->assign($strParameter, $strValue);  }    public function parse() {    $this->setMessageBody($this->objSmarty->fetch($this->path_to_template_file));  }  }?>

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?