migration GetLabs function from db2php to doctrine