Moved custom Doctrine 2 functions to config file