rixxi/latte-filters

This package is not installable via Composer 1.x, please make sure you upgrade to Composer 2+. Read more about our Composer 1.x deprecation policy.

0.1.1 2014-05-15 19:49 UTC

This package is not auto-updated.

Last update: 2021-10-16 00:31:37 UTC


README

You can now stop spamming prepareTemplateFilters and setup with template runtime helpers setup! This extension allows you to add dynamic filters (runtime helpers and helper loaders) to latte engine just by tagging service.

class DynamicHelperWithFewFilters
{

	function money($value) { /* ... */ }

	function formatTime($value) { /* ... */ }

}
service:
	-
		class: DynamicHelperWithFewFilters
		tags:
			latte.filter: [ money, formatTime: time ]

	-
		class: DynamicHelperLoader
		tags: [ latte.filterLoader ]

extensions:
	latteFilters: Rixxi\LatteFilters\DI\LatteFiltersExtension