jnjxp/phender

CLI php templates

0.1.0 2020-09-27 05:24 UTC

This package is auto-updated.

Last update: 2024-03-27 13:08:53 UTC


README

Quick and dirty cli php template rendering.

Usage

See example directory...

$ ./bin/phender \
    -i articles:./example/article-data.php \
    -v "site:My Site" \
    -h ./example/helpers.php \
    ./example/template/articles.phtml \
    ./example/template/layout.phtml > articles.html
  • -i/--include VAR:PATH sets VAR to value returned by including PATH
  • -v/--var VAR:VALUE sets VAR to VALUE
  • -h/--helpers PATH sets helpers to value returned by including PATH. Should return an array of callables.