mongo wrapper class for php