a php class to gen atom