updated php docs and entity interface