A object-oriented approach for IO in PHP