定制 ryancco/canon 二次开发

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

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

ryancco/canon

最新稳定版本:v0.3

Composer 安装命令:

composer require ryancco/canon

包简介

Generate files from templates

README 文档

README

Latest Version on Packagist Tests Total Downloads

Generate files from templates in PHP. Useful in development for templating commonly created files or files with extensive boilerplate or formatting. Leverage the full power of your preferred templating language by implementing the Ryancco\Canon\Contracts\Compiler interface. This package includes a dependency-free, "pure PHP" implementation that supports simple variable replacement as well as an implementation for the Blade templating engine and the Twig templating engine. Each require you add the respective compiler engine to your project dependencies.

Write or read files to and from separate filesystems including local, S/FTP, AWS S3 and more by requiring any of the supported Flysystem adapters.

Installation

You can install the package via composer:

composer require [--dev] ryancco/canon

Usage

use Ryancco\Canon;

$canon = new Canon($filesystem);

// using a template file
$canon->generate('hello-world.txt', 'filename.out', ['name' => 'World']);

// using a template string
$canon->generate('Hello, { name }.', 'filename.out', ['name' => 'World']);

Testing

composer test

Changelog

Please see the Release Notes for more information on what has changed recently.

Credits

License

The MIT License (MIT). Please see License File for more information.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2022-08-04