承接 arcadis-intelligence/gomphplate 相关项目开发

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

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

arcadis-intelligence/gomphplate

最新稳定版本:0.2.1

Composer 安装命令:

composer require arcadis-intelligence/gomphplate

包简介

A wrapper for the yaml templating engine gomplate

README 文档

README

Requirements

  • PHP 8.0 or higher
  • Gomplate

Configuration

You can specify the path to the gomplate binary by setting the GOMPLATE_PATH environment variable.

Installation

composer require arcadis-intelligence/gomphplate

Usage

use ArcadisIntelligence\Gomphplate\Gomphplate;

$template = <<<YAML
people:
{{- range .people }}
  - name: {{ .name }}
    age: {{ .age }}
{{- end }}
YAML;

$data = [
    'people' => [
        ['name' => 'Alice', 'age' => 30],
        ['name' => 'Bob', 'age' => 25],
    ],
];

$renderedYaml = Gomphplate::renderYaml($template, $data);

Should produce

people:
  - name: Alice
    age: 30
  - name: Bob
    age: 25

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: Apache-2.0
  • 更新时间: 2025-02-19