change php formation of class and functions to PEAR standarts