PHP class to implement file handling operations for multiple file types