定制 silverslice/docx-template 二次开发

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

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

silverslice/docx-template

最新稳定版本:v0.3.3

Composer 安装命令:

composer require silverslice/docx-template

包简介

Replace variables in docx document

README 文档

README

Install

composer require silverslice/docx-template

Usage

Place variables in your docx-document as {foo}. Then replace them with replace method. Use replaceMultiline to replace variables with multiline strings.

use Silverslice\DocxTemplate\Template;

require __DIR__ . '/vendor/autoload.php';

$template = new Template();

// open docx file
$template->open('test.docx')

    // replace one variable to another
    ->replace('one', 'two')

    // replace once more
    ->replace('foo', 'bar')
    
    // replace with multiline string 
    ->replaceMultiline('foo', 'one
        two
        three')

    // save docx document
    ->save('test.docx');

统计信息

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

GitHub 信息

  • Stars: 7
  • Watchers: 4
  • Forks: 5
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2015-08-28