phore / template
Inject variables into a template
Installs: 69
Dependents: 1
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 0
Open Issues: 0
pkg:composer/phore/template
Requires
- php: >=8.1
- phore/filesystem: *
Requires (Dev)
This package is auto-updated.
Last update: 2025-09-19 12:23:47 UTC
README
Usage
Template Syntax
ifdef
- If the variable is definedifndef
- If the variable is not definedfor
- Loop through the list
# Normal Variable substitution
Hello {{ name }}!
{% ifdef city %}
Your city is {{ city }}.
{% endif %}
{% ifndef city %}
Your city is {{ city }}.
{% endif %}
{% for cityList as city %}
{{ city }}
{% endfor %}
# This is a comment! It will not be included to the output.
{{ name | uppercase }}
{{ dateList | each | uppercase }}
# Example on how to use filter with arguments
{{ curdate | dateFormat format="YYYY-MM-DD" }}