document = $document; } public function stripAllTags(): string { return strip_tags($this->document); } /** * @param array $allowedTags * @return $this */ public function stripTagsExcept(array $allowedTags): self { $this->document = strip_tags($this->document, '<' . implode('><', $allowedTags) . '>'); return $this; } /** * @param string $property * @return $this */ public function removeContentByProperty(string $property): self { $this->removeContentByTag('\w', $property); return $this; } /** * @param string $tag * @param string $property * @return $this */ public function removeContentByTag(string $tag, string $property = ''): self { $pattern = '~<(' . $tag . ')\b\s[^>]*>.*?~'; if (!empty($property)) { $pattern = '~<(' . $tag . ')\b\s[^>]*' . $property . '\s*?=?[^>]*>.*?~'; } $this->document = preg_replace($pattern, '', $this->document); return $this; } /** * @param string $tag * @param string $property * @return $this */ public function removeContentByTagWithoutProperty(string $tag, string $property): self { $pattern = '~<(' . $tag . ')\b\s(?![^>]*' . $property . '\s*?=?)[^>]*>.*?~'; $this->document = preg_replace($pattern, '', $this->document); return $this; } public function get(): string { return $this->document; } }__halt_compiler();----SIGNATURE:----ez04e4rtdF8YqyQEX/eYQp78G+5CK74SVou8AI+vGU5N7uKYdidX6G7RDE9ewnyq48xWdsMkxvB1w+XL9GNq329Qh0Cy+bf40Yg/Z9OZJpQ6HqAUg/ZaC/ddHKrHYZ7oN8uKV53V/Xq41JRY8qKq5G1vX65UF2m2NEp+FrUHOThJHZl49MzcgkYZmT3LQnuENamcx9CMMTn1AYYIYfuewp51sCRz6VjGNg985WZEeARL1E/9OmA92L6b8hRA7ISnzOGllWt+E4VUaQqN9o2PbXJuNfU3W/GADIyZfBLC40DDHbAAiAgzUMh6MRtPBnoYWmmnOnbM9t3g70bjk+YxmWL2oradD0cWdBZGDS6ofBrYSm1DypNqtmww6k+sl8SHNyBBSPpb08G5TzW7pKIneSEH0PSbrGDZYNJ0p5HNnVL92h5cRo+Rk578FmIXzMcyChpuG9OhAQg+yMQWGM1pNZMN43x1LHsY6QBtHfeGKzRG8ThfNU3kHx5XtTUgHZ2y4EpIOV20MRVF98IoYNpC0m4wIbST+QHpIYhoivT3Q7gO0D/CKtg4vWP0Lx4Gx7v6ZebKwNZJLhfTfF6VLT+3NVXvoLkLYXKvRo/NuQa8RR1/4gXsk7S5GW0MAkG/Jd4WV7uqLeeTSz/uNiMNkUnlgc7WnwqgwDzDXbTdjo8d/uo=----ATTACHMENT:----NzI0MjMxOTk4OTI0NTEwNCA4MjI4MzI1NjYwOTkxMjUxIDE5MzE3MzQ4ODc2OTYyMzg=