Updated with latest phplibrarytemplate additions.