1 | <?php |
||
11 | class SimpleHtmlDomNode extends \ArrayObject implements SimpleHtmlDomNodeInterface |
||
12 | { |
||
13 | /** @noinspection MagicMethodsValidityInspection */ |
||
14 | |||
15 | /** |
||
16 | * @param string $name |
||
17 | * |
||
18 | * @return array|null |
||
19 | */ |
||
20 | 3 | public function __get($name) |
|
38 | |||
39 | /** |
||
40 | * alias for "$this->innerHtml()" (added for compatibly-reasons with v1.x) |
||
41 | */ |
||
42 | public function outertext() |
||
46 | |||
47 | /** |
||
48 | * alias for "$this->innerHtml()" (added for compatibly-reasons with v1.x) |
||
49 | */ |
||
50 | public function innertext() |
||
54 | |||
55 | /** |
||
56 | * @param string $selector |
||
57 | * @param int $idx |
||
58 | * |
||
59 | * @return SimpleHtmlDomNode|SimpleHtmlDomNode[]|null |
||
60 | */ |
||
61 | public function __invoke($selector, $idx = null) |
||
65 | |||
66 | /** |
||
67 | * @return string |
||
68 | */ |
||
69 | 2 | public function __toString() |
|
78 | |||
79 | /** |
||
80 | * Find one node with a CSS selector. |
||
81 | * |
||
82 | * @param string $selector |
||
83 | * |
||
84 | * @return SimpleHtmlDomNode|null |
||
85 | */ |
||
86 | public function findOne(string $selector) |
||
90 | |||
91 | /** |
||
92 | * Find list of nodes with a CSS selector. |
||
93 | * |
||
94 | * @param string $selector |
||
95 | * @param int $idx |
||
96 | * |
||
97 | * @return SimpleHtmlDomNode|SimpleHtmlDomNode[]|null |
||
98 | */ |
||
99 | 11 | public function find(string $selector, $idx = null) |
|
121 | |||
122 | /** |
||
123 | * Get html of elements. |
||
124 | * |
||
125 | * @return array |
||
126 | */ |
||
127 | 1 | public function innerHtml(): array |
|
136 | |||
137 | /** |
||
138 | * Get plain text. |
||
139 | * |
||
140 | * @return array |
||
141 | */ |
||
142 | 1 | public function text(): array |
|
151 | } |
||
152 |