This mustache implementation is fast, well known, stable, and extensively used in some big applications.
Questions such those raised in issues https://github.com/jbboehr/php-mustache/issues/45 and https://github.com/jbboehr/php-mustache/issues/4 suggest that examples of template loading, AST walking, and partials resolution would be helpful. In the spirit of php.net documentation I have just added an examples section to the end of the README.md and provided an example covering all 3 topics.
The Mustache_Template_Loader class is extracted from production code. The implementation of
the resolve_partials function does suggest that it would be nice to expose as constants in the MustacheAST class the type enum from https://github.com/jbboehr/libmustache/blob/master/src/node.hpp
This mustache implementation is fast, well known, stable, and extensively used in some big applications.
Questions such those raised in issues https://github.com/jbboehr/php-mustache/issues/45 and https://github.com/jbboehr/php-mustache/issues/4 suggest that examples of template loading, AST walking, and partials resolution would be helpful. In the spirit of php.net documentation I have just added an examples section to the end of the README.md and provided an example covering all 3 topics.
The Mustache_Template_Loader class is extracted from production code. The implementation of the resolve_partials function does suggest that it would be nice to expose as constants in the MustacheAST class the type enum from https://github.com/jbboehr/libmustache/blob/master/src/node.hpp