add plugin

This commit is contained in:
Jaeger
2017-09-22 19:09:43 +08:00
parent 624f071a0d
commit 5422168c98
9 changed files with 155 additions and 8 deletions

View File

@@ -35,9 +35,6 @@ use phpQueryObject;
* @method Elements filterCallback($callback,$_skipHistory)
* @method Elements filter($selectors,$_skipHistory)
* @method load($url,$data,$callback)
* @method css()
* @method show()
* @method hide()
* @method Elements trigger($type,$data)
* @method Elements triggerHandler($type,$data)
* @method Elements bind($type,$data,$callback)
@@ -199,4 +196,13 @@ class Elements
return trim($item->html());
});
}
/**
* @return phpQueryObject
*/
public function getElements(): phpQueryObject
{
return $this->elements;
}
}

View File

@@ -33,10 +33,10 @@ class Query
return $this->html;
}
public function setHtml($html)
public function setHtml($html, $charset = null)
{
$this->html = value($html);
$this->document = phpQuery::newDocumentHTML($this->html);
$this->document = phpQuery::newDocumentHTML($this->html,$charset);
return $this->ql;
}