Skip to content

Commit

Permalink
👔 up: use easytpl replace text template
Browse files Browse the repository at this point in the history
  • Loading branch information
inhere committed Jan 14, 2023
1 parent e0ab2a0 commit 13226b7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
3 changes: 1 addition & 2 deletions app/Concern/InitApplicationTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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 () {
Expand Down
3 changes: 1 addition & 2 deletions app/Helper/KiteUtil.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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');
Expand Down

0 comments on commit 13226b7

Please sign in to comment.