A PHP template class based on AngularJS