承接 codemonster-ru/view-php 相关项目开发

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

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

codemonster-ru/view-php

最新稳定版本:v2.1.0

Composer 安装命令:

composer require codemonster-ru/view-php

包简介

PHP template engine for codemonster-ru/view

README 文档

README

Latest Version on Packagist Total Downloads License Tests

PHP template engine for the codemonster-ru/view core.
Uses the core Locator for consistent file resolution (dot-notation, namespaces, multiple base paths).

📦 Installation

Via Composer:

composer require codemonster-ru/view-php

🚀 Usage

use Codemonster\View\View;
use Codemonster\View\Locator\DefaultLocator;
use Codemonster\View\Engines\PhpEngine;

$locator = new DefaultLocator([__DIR__ . '/resources/views']); // can be an array
$engine = new PhpEngine($locator, 'php'); // or ['phtml','php']
$view = new View(['php' => $engine], 'php');

echo $view->render('emails.welcome', ['user' => 'Vasya']);

🧪 Testing

You can run tests with the command:

composer test

👨‍💻 Author

Kirill Kolesnikov

📜 License

MIT

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2025-09-27