diff --git a/app/Concern/InitApplicationTrait.php b/app/Concern/InitApplicationTrait.php index 0378395..afea74f 100644 --- a/app/Concern/InitApplicationTrait.php +++ b/app/Concern/InitApplicationTrait.php @@ -9,7 +9,6 @@ use Monolog\Logger; use PhpPkg\Config\ConfigBox; use PhpPkg\EasyTpl\EasyTemplate; -use PhpPkg\EasyTpl\TextTemplate; use PhpPkg\JenkinsClient\MultiJenkins; use Toolkit\Stdlib\Arr\ArrayHelper; use Toolkit\Stdlib\Obj\ObjectBox; @@ -109,7 +108,7 @@ protected function registerComServices(ObjectBox $box): void }); $box->set('txtRender', function () { - return TextTemplate::new()->disableEchoFilter(); + return EasyTemplate::textTemplate()->disableEchoFilter(); }); $box->set('htmlRender', function () { diff --git a/app/Helper/KiteUtil.php b/app/Helper/KiteUtil.php index 8e4747a..425f3cd 100644 --- a/app/Helper/KiteUtil.php +++ b/app/Helper/KiteUtil.php @@ -4,7 +4,6 @@ use Inhere\Kite\Kite; use PhpPkg\EasyTpl\EasyTemplate; -use PhpPkg\EasyTpl\TextTemplate; use Toolkit\FsUtil\FS; use Toolkit\Stdlib\OS; use Toolkit\Stdlib\Str; @@ -111,7 +110,7 @@ public static function userConfigDir(string $path = ''): string */ public static function newTplEngine(array $config = []): EasyTemplate { - return TextTemplate::new($config) + return EasyTemplate::textTemplate($config) ->setPathResolver([Kite::class, 'resolve']) ->configThis(function (EasyTemplate $tpl) { $tpl->tmpDir = Kite::getTmpPath('tplCache');