/** * Creates new document from markup. * Chainable. * * @param null $markup * @param string $contentType * @return PhpQueryObject|QueryTemplatesSource|QueryTemplatesParse|QueryTemplatesSourceQuery */ public static function newDocumentPHP($markup = null, $contentType = "text/html") { // TODO pass charset to phpToMarkup if possible (use DOMDocumentWrapper function) $markup = PhpQuery::phpToMarkup($markup, self::$defaultCharset); return self::newDocument($markup, $contentType); }