PHPackages                             qingmvc/qingtpl - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Templating &amp; Views](/categories/templating)
4. /
5. qingmvc/qingtpl

ActiveLibrary[Templating &amp; Views](/categories/templating)

qingmvc/qingtpl
===============

qingtpl模版编译引擎,模版编译组件,qingmvc tamplate compile component

09PHP

Since Aug 17Pushed 7y ago1 watchersCompare

[ Source](https://github.com/qingmvc/qingtpl)[ Packagist](https://packagist.org/packages/qingmvc/qingtpl)[ RSS](/packages/qingmvc-qingtpl/feed)WikiDiscussions master Synced 4w ago

READMEChangelogDependenciesVersions (1)Used By (0)

QingTpl超轻量视图编译引擎
================

[](#qingtpl超轻量视图编译引擎)

QingTpl模版编译引擎,模版编译组件,qingmvc tamplate compile component

[语法手册](docs/SUMMARY.md)

-
-
-
-

简单的视图编译器
--------

[](#简单的视图编译器)

- 只是简单的替换模版标签成原生php代码``
- 没有其他多余的依赖
- 只编译，并不渲染
- 被包含文件，修改后不能及时的更新编译缓存，不能解决

composer载入qingtpl
=================

[](#composer载入qingtpl)

```
"require": {
	"php": ">=5.3.0",
	"qingmvc/qingtpl":"dev-master",
}

```

qingmvc载入qingtpl
================

[](#qingmvc载入qingtpl)

```
//命名空间映射
'namespaces' =>
[
	'qingtpl'=>'/qingtpl/src'
],

```

QingMVC配置
=========

[](#qingmvc配置)

```
//组件列表
'components'=>
[
	//视图组件
	'view'=>
	[
		'class'=>'\qing\view\CachedView'
	],
	//视图编译组件
	'view.compiler'=>
	[
		'creator'=>'\qingtpl\CompilerCreator',
	]
]

```

QingMVC使用
=========

[](#qingmvc使用)

```
//$viewFile 原始视图文件
//$cacheFile 视图缓存文件
$compiler=com('view.compiler');
$compiler->compile($viewFile,$cacheFile);

```

语法手册
====

[](#语法手册)

- [0.简介](docs/0.%E7%AE%80%E4%BB%8B.md)
- [1.0.配置和使用](docs/1.0.%E9%85%8D%E7%BD%AE%E5%92%8C%E4%BD%BF%E7%94%A8.md)
- [1.1.配置和使用.QingMVC](docs/1.1.%E9%85%8D%E7%BD%AE%E5%92%8C%E4%BD%BF%E7%94%A8.QingMVC.md)
- [2.0.模版常量](docs/2.0.%E6%A8%A1%E7%89%88%E5%B8%B8%E9%87%8F.md)
- [2.1.模版常量.宏定义define](docs/2.1.%E6%A8%A1%E7%89%88%E5%B8%B8%E9%87%8F.%E5%AE%8F%E5%AE%9A%E4%B9%89define.md)
- [3.条件编译](docs/3.%E6%9D%A1%E4%BB%B6%E7%BC%96%E8%AF%91.md)
- [4.0.函数](docs/4.0.%E5%87%BD%E6%95%B0.md)
- [4.1.前置编译函数](docs/4.1.%E5%89%8D%E7%BD%AE%E7%BC%96%E8%AF%91%E5%87%BD%E6%95%B0.md)
- [5.0.包含文件](docs/5.0.%E5%8C%85%E5%90%AB%E6%96%87%E4%BB%B6.md)
- [5.1.包含视图文件](docs/5.1.%E5%8C%85%E5%90%AB%E8%A7%86%E5%9B%BE%E6%96%87%E4%BB%B6.md)
- [5.2.包含纯文本文件](docs/5.2.%E5%8C%85%E5%90%AB%E7%BA%AF%E6%96%87%E6%9C%AC%E6%96%87%E4%BB%B6.md)
- [6.静态内容-不解析内容](docs/6.%E9%9D%99%E6%80%81%E5%86%85%E5%AE%B9-%E4%B8%8D%E8%A7%A3%E6%9E%90%E5%86%85%E5%AE%B9.md)
- [7.变量](docs/7.%E5%8F%98%E9%87%8F.md)
- [8.区块](docs/8.%E5%8C%BA%E5%9D%97.md)
- [9.条件判断](docs/9.%E6%9D%A1%E4%BB%B6%E5%88%A4%E6%96%AD.md)
- [10.循环遍历](docs/10.%E5%BE%AA%E7%8E%AF%E9%81%8D%E5%8E%86.md)
- [11.其他](docs/11.%E5%85%B6%E4%BB%96.md)
- [12.插件](docs/12.%E6%8F%92%E4%BB%B6.md)
- [13.模版注释](docs/13.%E6%A8%A1%E7%89%88%E6%B3%A8%E9%87%8A.md)
- [14.清除注释或多余空格](docs/14.%E6%B8%85%E9%99%A4%E6%B3%A8%E9%87%8A%E6%88%96%E5%A4%9A%E4%BD%99%E7%A9%BA%E6%A0%BC.md)
- [README](docs/README.md)
- [SUMMARY](docs/SUMMARY.md)

###  Health Score

19

—

LowBetter than 10% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity40

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://www.gravatar.com/avatar/a2a5a09e9277468f5b864c2ce93958aa93720e3dcf73ce82a50b8cc042ba1f90?d=identicon)[qingmvc](/maintainers/qingmvc)

---

Top Contributors

[![pandaengine](https://avatars.githubusercontent.com/u/7309485?v=4)](https://github.com/pandaengine "pandaengine (1 commits)")

### Embed Badge

![Health badge](/badges/qingmvc-qingtpl/health.svg)

```
[![Health](https://phpackages.com/badges/qingmvc-qingtpl/health.svg)](https://phpackages.com/packages/qingmvc-qingtpl)
```

###  Alternatives

[mustache/mustache

A Mustache implementation in PHP.

3.3k44.6M291](/packages/mustache-mustache)[roots/acorn

Framework for Roots WordPress projects built with Laravel components.

9682.1M97](/packages/roots-acorn)[whitecube/nova-flexible-content

Flexible Content &amp; Repeater Fields for Laravel Nova.

8053.0M25](/packages/whitecube-nova-flexible-content)[mopa/bootstrap-bundle

Easy integration of twitters bootstrap into symfony2

7042.9M33](/packages/mopa-bootstrap-bundle)[limenius/react-bundle

Client and Server-side react rendering in a Symfony Bundle

3871.2M](/packages/limenius-react-bundle)[symfony/ux-icons

Renders local and remote SVG icons in your Twig templates.

545.8M69](/packages/symfony-ux-icons)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
