This is HTML_Template_Sigma from PEAR, written as a composer package, with a few additions.