class manager written in php