| @@ 188-194 (lines=7) @@ | ||
| 185 | { |
|
| 186 | $matches = false; |
|
| 187 | ||
| 188 | if (empty($this->chunks)) { |
|
| 189 | if ($this->content) { |
|
| 190 | $this->chunks = [$this->content]; |
|
| 191 | } else { |
|
| 192 | return $this; |
|
| 193 | } |
|
| 194 | } |
|
| 195 | foreach ($this->chunks as $id => $chunk) { |
|
| 196 | // |
|
| 197 | $keep_chunk = true; |
|
| @@ 235-241 (lines=7) @@ | ||
| 232 | */ |
|
| 233 | public function parse_fom_chunks(string $pattern, bool $only_one = false, bool $restart = false): PfPageparser |
|
| 234 | { |
|
| 235 | if (empty($this->chunks)) { |
|
| 236 | if ($this->content) { |
|
| 237 | $this->chunks = [$this->content]; |
|
| 238 | } else { |
|
| 239 | return $this; |
|
| 240 | } |
|
| 241 | } |
|
| 242 | if ($restart || empty($this->parsed)) { |
|
| 243 | $items =& $this->chunks; |
|
| 244 | $this->parsed = []; |
|