/** * Creates new document from markup. * Chainable. * * @param null $markup * @param null $contentType * @return PhpQueryObject|QueryTemplatesSource|QueryTemplatesParse|QueryTemplatesSourceQuery */ public static function newDocument($markup = null, $contentType = null) { if (!$markup) { $markup = ''; } $documentID = PhpQuery::createDocumentWrapper($markup, $contentType); return new PhpQueryObject($documentID); }