/** * Enter description here... * * @return phpQuery|queryTemplatesFetch|queryTemplatesParse|queryTemplatesPickup */ public function __construct($domId) { if ($domId instanceof self) { $domId = $domId->domId; } if (!isset(self::$documents[$domId])) { throw new Exception("DOM with ID '{$domId}' isn't loaded. Use phpQuery::newDocument(\$html) or phpQuery::newDocumentFile(\$file) first."); return; } $this->domId = $domId; self::$lastDomId = $domId; $this->DOM = self::$documents[$domId]['document']; $this->XPath = self::$documents[$domId]['xpath']; $this->documentFragment = self::$documents[$domId]['documentFragment']; $this->root = $this->DOM->documentElement; // $this->toRoot(); $this->elements = array($this->root); }