Implement basic template system through PHP.

Change-Id: Ib70a3881a9d04e91cbd0c289fd627218242226ae