optimize security interface
move php class
add php api