Fix pQuery classes to respect psr-4
This commit is contained in:
committed by
M. Shull
parent
3e66e9e1dd
commit
b07975b91b
15
lib/Util/pQuery/DomNode.php
Normal file
15
lib/Util/pQuery/DomNode.php
Normal file
@ -0,0 +1,15 @@
|
||||
<?php
|
||||
|
||||
namespace MailPoet\Util\pQuery;
|
||||
|
||||
class DomNode extends \pQuery\DomNode {
|
||||
public $childClass = 'MailPoet\Util\pQuery\DomNode';
|
||||
|
||||
function getInnerText() {
|
||||
return html_entity_decode($this->toString(true, true, 1), ENT_NOQUOTES, 'UTF-8');
|
||||
}
|
||||
|
||||
function getOuterText() {
|
||||
return html_entity_decode($this->toString(), ENT_NOQUOTES, 'UTF-8');
|
||||
}
|
||||
}
|
8
lib/Util/pQuery/Html5Parser.php
Normal file
8
lib/Util/pQuery/Html5Parser.php
Normal file
@ -0,0 +1,8 @@
|
||||
<?php
|
||||
|
||||
namespace MailPoet\Util\pQuery;
|
||||
|
||||
class Html5Parser extends \pQuery\HtmlParser {
|
||||
/** @var string|\pQuery\DomNode */
|
||||
public $root = 'MailPoet\Util\pQuery\DomNode';
|
||||
}
|
@ -9,20 +9,3 @@ class pQuery extends \pQuery {
|
||||
return $parser->root;
|
||||
}
|
||||
}
|
||||
|
||||
class Html5Parser extends \pQuery\HtmlParser {
|
||||
/** @var string|\pQuery\DomNode */
|
||||
public $root = 'MailPoet\Util\pQuery\DomNode';
|
||||
}
|
||||
|
||||
class DomNode extends \pQuery\DomNode {
|
||||
public $childClass = 'MailPoet\Util\pQuery\DomNode';
|
||||
|
||||
function getInnerText() {
|
||||
return html_entity_decode($this->toString(true, true, 1), ENT_NOQUOTES, 'UTF-8');
|
||||
}
|
||||
|
||||
function getOuterText() {
|
||||
return html_entity_decode($this->toString(), ENT_NOQUOTES, 'UTF-8');
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user