Extracted the PHP renderer generator's template parser into its own helper class