getDocument() 공개 메소드

Returns object with stack set to document root.
public getDocument ( ) : phpQueryObject | QueryTemplatesSource | QueryTemplatesParse | QueryTemplatesSourceQuery
리턴 phpQueryObject | QueryTemplatesSource | QueryTemplatesParse | QueryTemplatesSourceQuery
예제 #1
0
 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);
 }