phpQueryObject::getDocument PHP Method

getDocument() public method

Returns object with stack set to document root.
public getDocument ( ) : phpQueryObject | QueryTemplatesSource | QueryTemplatesParse | QueryTemplatesSourceQuery
return phpQueryObject | QueryTemplatesSource | QueryTemplatesParse | QueryTemplatesSourceQuery
    public function getDocument()
    {
        return phpQuery::getDocument($this->getDocumentID());
    }

Usage Example

Exemplo n.º 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);
     }
 }
All Usage Examples Of phpQueryObject::getDocument