PHP library for single page javascript applications