PHPackages                             pmvc-plugin/view - 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. pmvc-plugin/view

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

pmvc-plugin/view
================

PMVC official view engine

0.5.6(4y ago)03.1k8MITPHP

Since Dec 11Pushed 4y ago1 watchersCompare

[ Source](https://github.com/pmvc-plugin/view)[ Packagist](https://packagist.org/packages/pmvc-plugin/view)[ Docs](https://github.com/pmvc-plugin/view)[ RSS](/packages/pmvc-plugin-view/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (3)Dependencies (2)Versions (9)Used By (8)

[![Latest Stable Version](https://camo.githubusercontent.com/9ae36918625bd2495ae8dff19eba8fa1652f68aa5eeb9c759ad3de7dd5faf505/68747470733a2f2f706f7365722e707567782e6f72672f706d76632d706c7567696e2f766965772f762f737461626c65)](https://packagist.org/packages/pmvc-plugin/view)[![Latest Unstable Version](https://camo.githubusercontent.com/f2824af8848dde167048c155e31e634981b405cfc7b2035c68cedb78b0e0498a/68747470733a2f2f706f7365722e707567782e6f72672f706d76632d706c7567696e2f766965772f762f756e737461626c65)](https://packagist.org/packages/pmvc-plugin/view)[![CircleCI](https://camo.githubusercontent.com/fd048428953dc6d91b54d25f5b683c27138b20aa8fabd9073359702e58f89f54/68747470733a2f2f636972636c6563692e636f6d2f67682f706d76632d706c7567696e2f766965772f747265652f6d61737465722e7376673f7374796c653d737667)](https://circleci.com/gh/pmvc-plugin/view/tree/master)[![License](https://camo.githubusercontent.com/bb46e631d1c1c5fd72910e2092eb65cd794e2ec0881d0ebe9bf367e051278199/68747470733a2f2f706f7365722e707567782e6f72672f706d76632d706c7567696e2f766965772f6c6963656e7365)](https://packagist.org/packages/pmvc-plugin/view)[![Total Downloads](https://camo.githubusercontent.com/8fdc29ec8a192c3bc3a546e28ca6963c4053f6db8364f5bd7422cbe03952cd00/68747470733a2f2f706f7365722e707567782e6f72672f706d76632d706c7567696e2f766965772f646f776e6c6f616473)](https://packagist.org/packages/pmvc-plugin/view)

PMVC View template
==================

[](#pmvc-view-template)

Explain Template variable
-------------------------

[](#explain-template-variable)

- 1. Initiate

    - App assign params to template variable by logic
- 2. Before process view

    - If plug [view\_config\_helper](https://github.com/pmvc-plugin/view_config_helper). (Why need use view\_config\_helper)
        - 1. Load global option 'VIEW'.
        - 2. Merge global option 'I18N' with VIEW\['I18N'\]
        - 3. Get configs from .env.view and merge to configs, it's useful when you need develop and overwrite remote configs.
        - 4. If have view\_config\_helper callback will cook $config by callback
        - 5. Set all above configs to template variable.
- 3. Running view process

    - View engine will extra specific tpl config to plugin config
    - Specific keys such as 'assetsRoot' will copy from template variable to plugin config, if we have variabe need overwirte plugin config from view\_config\_helper.

### Explain theme config

[](#explain-theme-config)

**Config location** : \[SiteFolder\]/themes/\[ThemeName\]/config/config.php

- Example: [https://github.com/pmvc-theme/hello\_react/blob/master/config/config.php](https://github.com/pmvc-theme/hello_react/blob/master/config/config.php)

```
${_INIT_CONFIG}=[
  'backend' => [], // will append with view plugin and use in backend.
  'view' => [], // will append to front-end view variable, and could see it in browser (JS) level.
  'compile' => [], // use webpack compile only
];
```

-

### How to handle output header?

[](#how-to-handle-output-header)

Pass Template Folder
--------------------

[](#pass-template-folder)

- user pmvc config \_TEMPLATE\_DIR
-

Purpose
-------

[](#purpose)

- Use \_\_invoke to get other framework object instance
    -

Shareable forward
-----------------

[](#shareable-forward)

- [https://github.com/pmvc-plugin/default\_forward](https://github.com/pmvc-plugin/default_forward)

Install with Composer
---------------------

[](#install-with-composer)

### 1. Download composer

[](#1-download-composer)

- mkdir test\_folder
- curl -sS  | php

### 2. Edit composer file

[](#2-edit-composer-file)

- vim composer.json

```
{
    "require": {
        "pmvc-plugin/view": "dev-master"
    }
}

```

###  Health Score

29

—

LowBetter than 59% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity17

Limited adoption so far

Community15

Small or concentrated contributor base

Maturity56

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.

###  Release Activity

Cadence

Every ~174 days

Recently: every ~1 days

Total

8

Last Release

1497d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/6f593111e77142a10224458b0436e6b2d6f3e537f924c03130f0208bd3c4477f?d=identicon)[HillLiu](/maintainers/HillLiu)

---

Top Contributors

[![HillLiu](https://avatars.githubusercontent.com/u/1877738?v=4)](https://github.com/HillLiu "HillLiu (77 commits)")

---

Tags

pmvc-viewviewviewplug-inpmvc

### Embed Badge

![Health badge](/badges/pmvc-plugin-view/health.svg)

```
[![Health](https://phpackages.com/badges/pmvc-plugin-view/health.svg)](https://phpackages.com/packages/pmvc-plugin-view)
```

###  Alternatives

[laminas/laminas-view

Fast and type safe HTML templating library with a flexible plugin system supporting multistep template composition

7526.3M230](/packages/laminas-laminas-view)

PHPackages © 2026

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