move some codes into composePHPRender, more testable
move some codes into composePHPRender, more testable

jmgq/lightncandy,zordius/lightncandy,fadimko/lightncandy,jmgq/lightncandy,Corollarium/lightncandy,cgvarela/lightncandy,Southparkfan/lightncandy,fadimko/lightncandy,Southparkfan/lightncandy,zordius/lightncandy,cgvarela/lightncandy,vein1992/lightncandy,Corollarium/lightncandy,vein1992/lightncandy