Add more beautiful code with php inheritance