定制 dqneo/smarty-delimiter-converter 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

dqneo/smarty-delimiter-converter

Composer 安装命令:

composer require dqneo/smarty-delimiter-converter

包简介

a cli tool to convert delimiters in smarty template files

README 文档

README

Build Status

convert tool to replace delimiters (e.g. from { } to {{ }}) in your smarty template files.

DESCRIPTION

It converts the content

{if $config.smarty_debug}
  {debug}
{/if}

into this

{{if $config.smarty_debug}}
  {{debug}}
{{/if}}

You can customize delimiters as you like.

INSTALL

composer require dqneo/smarty-delimiter-converter

USAGE

use DQNEO\SmartyDelimiterConverter\Converter;

// define delimiters
$from = ['{', '}'];
$to = ['{{', '}}'];

$converter = new Converter($from, $to);

// convert a content
$converted = $converter->convert('hello {$name}'); // => 'hello {{$name}}'

# convert a file
$converted = $converter->convert('/path/to/file.tpl'); // returns a converted content

you can convert all template files under a directory recursivlely

./bin/smarty-delimiter-converter /path/to/dir/

统计信息

  • 总下载量: 26
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 1
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 1
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: LGPL-3.0
  • 更新时间: 2016-02-10

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固