Returns object with stack set to document root.
public getDocument ( ) : phpQueryObject | QueryTemplatesSource | QueryTemplatesParse | QueryTemplatesSourceQuery | ||
return | phpQueryObject | QueryTemplatesSource | QueryTemplatesParse | QueryTemplatesSourceQuery |
public function processForImages() { if ($this->options->convert_page_images) { $this->document = phpQuery::newDocumentHTML(JResponse::getBody()); $this->identifyImageSources(); $this->processImages(); $this->populateImages(); $markup = $this->document->getDocument()->htmlOuter(); //TODO fix so that regex works with data uris? $markup = preg_replace('/(<(base|img|br|meta|area|input|link|col|hr|param|frame|isindex)+([\\s]+[\\S]+[\\s]*=[\\s]*("([^"]*)"|\'([^\']*)\'))*[\\s]*)>/imx', '$1/>', $markup); JResponse::setBody($markup); } }
/** * @return mixed */ public function populate() { $this->populateInlineScripts(); $this->populateScriptFiles(); $this->populateInlineStyles(); $this->populateStyleFiles(); $markup = $this->document->getDocument()->htmlOuter(); $markup = preg_replace('/(<(base|img|br|meta|area|input|link|col|hr|param|frame|isindex)+([\\s]+[\\S]+[\\s]*=[\\s]*("([^"]*)"|\'([^\']*)\'))*[\\s]*)>/imx', '$1/>', $markup); JResponse::setBody($markup); }