PHP trait for making extensible classes