fix rest class
move php api
update php interface