A PHP port of @wilsonpage's Model