1 | <?php |
||
13 | class SimpleHtmlDomNode extends \ArrayObject implements SimpleHtmlDomNodeInterface |
||
14 | { |
||
15 | /** @noinspection MagicMethodsValidityInspection */ |
||
16 | |||
17 | /** |
||
18 | * @param string $name |
||
19 | * |
||
20 | * @return array|null |
||
21 | */ |
||
22 | 4 | public function __get($name) |
|
45 | |||
46 | /** |
||
47 | * @param string $selector |
||
48 | * @param int $idx |
||
49 | * |
||
50 | * @return SimpleHtmlDomNode|SimpleHtmlDomNode[]|null |
||
51 | */ |
||
52 | public function __invoke($selector, $idx = null) |
||
56 | |||
57 | /** |
||
58 | * @return string |
||
59 | */ |
||
60 | 3 | public function __toString() |
|
71 | |||
72 | /** |
||
73 | * Find list of nodes with a CSS selector. |
||
74 | * |
||
75 | * @param string $selector |
||
76 | * @param int $idx |
||
77 | * |
||
78 | * @return SimpleHtmlDomNode|SimpleHtmlDomNode[]|null |
||
79 | */ |
||
80 | 11 | public function find(string $selector, $idx = null) |
|
104 | |||
105 | /** |
||
106 | * Find one node with a CSS selector. |
||
107 | * |
||
108 | * @param string $selector |
||
109 | * |
||
110 | * @return SimpleHtmlDomNode|null |
||
111 | */ |
||
112 | public function findOne(string $selector) |
||
116 | |||
117 | /** |
||
118 | * Get html of elements. |
||
119 | * |
||
120 | * @return string[] |
||
121 | */ |
||
122 | 1 | public function innerHtml(): array |
|
133 | |||
134 | /** |
||
135 | * alias for "$this->innerHtml()" (added for compatibly-reasons with v1.x) |
||
136 | */ |
||
137 | public function innertext() |
||
141 | |||
142 | /** |
||
143 | * alias for "$this->innerHtml()" (added for compatibly-reasons with v1.x) |
||
144 | */ |
||
145 | public function outertext() |
||
149 | |||
150 | /** |
||
151 | * Get plain text. |
||
152 | * |
||
153 | * @return string[] |
||
154 | */ |
||
155 | 2 | public function text(): array |
|
166 | } |
||
167 |