first cut at php api