40 lines
1.2 KiB
PHP
40 lines
1.2 KiB
PHP
<?php
|
|
// +----------------------------------------------------------------------
|
|
// | Bwsaas
|
|
// +----------------------------------------------------------------------
|
|
// | Copyright (c) 2015~2020 http://www.buwangyun.com All rights reserved.
|
|
// +----------------------------------------------------------------------
|
|
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
|
|
// +----------------------------------------------------------------------
|
|
// | Gitee ( https://gitee.com/buwangyun/bwsaas )
|
|
// +----------------------------------------------------------------------
|
|
// | Author: buwangyun <hnlg666@163.com>
|
|
// +----------------------------------------------------------------------
|
|
// | Date: 2020-9-28 10:55:00
|
|
// +----------------------------------------------------------------------
|
|
|
|
namespace bw\poster;
|
|
|
|
use bw\poster\template\Base;
|
|
|
|
/** GD绘制工厂类
|
|
* Class Common
|
|
* @package app\bwmall\model
|
|
*/
|
|
class PosterFactory
|
|
{
|
|
|
|
protected $tpl = null;
|
|
|
|
public function __construct($tpl){
|
|
if(is_object($tpl)&&$tpl instanceof Base)$this -> tpl = $tpl;
|
|
if(is_string($tpl))$this -> tpl = new $tpl;
|
|
}
|
|
|
|
//执行对应方法
|
|
public function __call($name,$arguments){
|
|
return $this->tpl->$name(...$arguments);
|
|
}
|
|
|
|
}
|