PicoFeed\Filter\Tag::removeEmptyTags PHP Метод

removeEmptyTags() публичный Метод

Remove empty tags.
public removeEmptyTags ( string $data ) : string
$data string Input data
Результат string
    public function removeEmptyTags($data)
    {
        return preg_replace('/<([^<\\/>]*)>([\\s]*?|(?R))<\\/\\1>/imsU', '', $data);
    }

Usage Example

Пример #1
0
 /**
  * Called after XML parsing.
  */
 public function postFilter()
 {
     $this->output = $this->tag->removeEmptyTags($this->output);
     $this->output = $this->filterRules($this->output);
     $this->output = $this->tag->removeMultipleBreakTags($this->output);
     $this->output = trim($this->output);
 }
All Usage Examples Of PicoFeed\Filter\Tag::removeEmptyTags