Fix deprecation warnings coming from pQuery library
[MAILPOET-3980]
This commit is contained in:
committed by
Veljko V
parent
539f518f64
commit
df6a955f0c
@@ -2,8 +2,11 @@
|
||||
|
||||
namespace MailPoet\Util\pQuery;
|
||||
|
||||
class DomNode extends \pQuery\DomNode {
|
||||
public $childClass = 'MailPoet\Util\pQuery\DomNode';
|
||||
use MailPoetVendor\pQuery\DomNode as pQueryDomNode;
|
||||
|
||||
class DomNode extends pQueryDomNode {
|
||||
public $childClass = DomNode::class;
|
||||
public $parserClass = Html5Parser::class;
|
||||
|
||||
public function getInnerText() {
|
||||
return html_entity_decode($this->toString(true, true, 1), ENT_NOQUOTES, 'UTF-8');
|
||||
@@ -12,4 +15,10 @@ class DomNode extends \pQuery\DomNode {
|
||||
public function getOuterText() {
|
||||
return html_entity_decode($this->toString(), ENT_NOQUOTES, 'UTF-8');
|
||||
}
|
||||
|
||||
public function query($query = '*') {
|
||||
$select = $this->select($query);
|
||||
$result = new pQuery((array)$select);
|
||||
return $result;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user