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