updated base api controller to work with symfony 2.3