承接 akawalko/template-renderer-interface 相关项目开发

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

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

akawalko/template-renderer-interface

最新稳定版本:v1.0.0

Composer 安装命令:

composer require akawalko/template-renderer-interface

包简介

Interface for a class that renders templates for string and PSR-7 response objects.

README 文档

README

Interface for a class that renders templates for string and PSR-7 response objects.

Installation

You can download this library using Composer:

Require php: >=7.2

composer require akawalko/template-renderer-interface

Methods

__get(string $name);

Get template variable. Return mixed value.

__set(string $name, $value): void;

Set template variable.

__isset(string $name): bool;

Determine if a variable is declared and is different than null.

__unset(string $name): void;

Unset a given variable

getVar(string $name);

Get template variable. Return mixed value.

setVar(string $name, $value): self;

Set template variable.

getVars(): array;

Get template variables.

setVars($data = []): self;

Set template variables from assoc. array or object.

renderToString(string $templatePath, $data = []): string;

Render the template to string with given data.

renderToResponse(ResponseInterface $response, string $templatePath, $data = []): ResponseInterface;

Render the template to PSR compliant Response class with given data.

render(...$arguments);

A shortcut method that executes renderToString() or renderToResponse() based on the arguments passed. Return ResponseInterface or string.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2024-01-04