Class for serving HTML via php DOMDocument