@@ 115-126 (lines=12) @@ | ||
112 | * |
|
113 | * @return bool |
|
114 | */ |
|
115 | public function __isset($name) |
|
116 | { |
|
117 | switch ($name) { |
|
118 | case 'outertext': |
|
119 | case 'innertext': |
|
120 | case 'plaintext': |
|
121 | case 'tag': |
|
122 | return true; |
|
123 | default: |
|
124 | return $this->hasAttribute($name); |
|
125 | } |
|
126 | } |
|
127 | ||
128 | /** |
|
129 | * @param $name |
@@ 166-178 (lines=13) @@ | ||
163 | * |
|
164 | * @return string |
|
165 | */ |
|
166 | public function __get($name) |
|
167 | { |
|
168 | switch ($name) { |
|
169 | case 'outertext': |
|
170 | return $this->html(); |
|
171 | case 'innertext': |
|
172 | return $this->innerHtml(); |
|
173 | case 'plaintext': |
|
174 | return $this->text(); |
|
175 | } |
|
176 | ||
177 | return null; |
|
178 | } |
|
179 | ||
180 | /** |
|
181 | * @param string $selector |