承接 slepic/php-template 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

slepic/php-template

最新稳定版本:1.1.0

Composer 安装命令:

composer require slepic/php-template

包简介

Simple PHP abstraction of template rendering.

README 文档

README

Build Status Style Status

php-template

Template rendering abstraction library. Abstract your libraries from specific templating engines.

Requirements

PHP 7.4 or 8

Installation

Install with composer

composer require slepic/php-template

Interfaces

TemplateInterface

This is the abstraction of any data rendering template.

Classes

OutputBufferTemplate

A simple template implementation, which renders the data using another PHP script (given its filename) and PHP ob_* functions.

DefaultDataTemplate

Template decorator which allows to feed your templates with default data hidden from the template consumer.

Contribution

If you create a library that depends on this one and you use composer, please consider the following:

Changelog

1.1.0

  • added new class DefaultDataTemplate
  • OutputBufferTemplate now ends the output buffer if the included template throws an exception.
  • OutputBufferTemplate now uses include instead of require to execute the template script .

1.0.0

  • bump PHP to ^7.4 || ^8.0
  • TemplateInterface::render() now has string return typehint
  • OutputBufferTemplate::render throws InvalidArgumentException if data argument contains keys that cannot be used as local variable names
  • use squizlabs/php_codesniffer instead of friendsofphp/php-cs-fixer for style check
  • bump dev deps to latest versions
  • use composer docker image for dev
  • move composer scripts to makefile

0.2.0

  • Added array typehint for first argument of TemplateInterface::render().
  • Changed travis setup to only run tests in oldest and newest php versions supported by this package (that is 5.6 and 7.3).

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: BSD-3-Clause
  • 更新时间: 2019-04-28