refactor gtags stuff to php addon