Base library for php web applications