PMVC official view engine

0.4.4 2021-05-27 18:32 UTC

This package is auto-updated.

Last update: 2021-11-27 19:26:34 UTC


README

Latest Stable Version Latest Unstable Version Build Status License Total Downloads

PMVC View template

Explain Template variable

    1. Initiate
    • App assign params to template variable by logic
    1. Before process view
    • If plug view_config_helper. (Why need use view_config_helper)
        1. Load global option 'VIEW'.
        1. Merge global option 'I18N' with VIEW['I18N']
        1. Get configs from .env.view and merge to configs, it's useful when you need develop and overwrite remote configs.
        1. If have view_config_helper callback will cook $config by callback
        1. Set all above configs to template variable.
    1. 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.

Pass Template Folder

Purpose

Share forward

Install with Composer

1. Download composer

2. Edit composer file

  • vim composer.json
{
    "require": {
        "pmvc-plugin/view": "dev-master"
    }
}