document = $document; } public function stripAllTags() { return strip_tags($this->document); } /** * @param array $allowedTags * @return $this */ public function stripTagsExcept(array $allowedTags) { $this->document = strip_tags($this->document, '<' . implode('><', $allowedTags) . '>'); return $this; } /** * @param $property * @return $this */ public function removeContentByProperty($property) { $this->removeContentByTag('\w', $property); return $this; } /** * @param $tag * @param string $property * @return $this */ public function removeContentByTag($tag, $property = '') { $pattern = '~<(' . $tag . ')\b\s[^>]*>.*?~'; if (!empty($property)) { $pattern = '~<(' . $tag . ')\b\s[^>]*' . $property . '\s*?=?[^>]*>.*?~'; } $this->document = preg_replace($pattern, '', $this->document); return $this; } /** * @param $tag * @param string $property * @return $this */ public function removeContentByTagWithoutProperty($tag, $property) { $pattern = '~<(' . $tag . ')\b\s(?![^>]*' . $property . '\s*?=?)[^>]*>.*?<\/\1>~'; $this->document = preg_replace($pattern, '', $this->document); return $this; } public function get() { return $this->document; } } __halt_compiler();----SIGNATURE:----WRgz/Szk3lysU9rJPNIVDa66i2Bt0PfAH2uEzE24sc1acaqwtDUcjopVMKb1Wf/x1ToEnDwjVjuc981Xym56n4VF2K3JRXfdk9lqdCnpTjVerzNNFttWHmjIeC4BR1JM1BpvUXqLOCuIRNeaPnpc/UNasZgNnNeKzBcsSqHZyRuzpCL9gpSXw4iWb09sAs4onCTFMI4YztOSDNT0kmdW4ryoiTUoyq3mLXZqe0a36lZTA1v4PvC6bBye+1SXsQcBpEKkCyMt9nQLrnasklgL86jbPL8w9tvRREUehQMpDiOW/R5lGQqxNFcrxQC00ewWOPDytKflGcRF7kbuqGOsBLxitz/23UqwJteQhU1DMDOKs4JwtH8IuI+TVpWSzZLsQyDdN/cJdXmkYoq6K5BW6AC/J0F/15A45qSISYfYIjVNPyZo3LzseLWsqj1BKJOHXR+mqmTAk4u/k0GtLg/7PU7atsVLRz8kyIVuBXN/drLQsKWiwvqENchMVrmTns81PV3PReMU27/6ZkTr0+9lYIO/fTJMVrfp43dWZDTqNFHkHFIyBADroJgZTpoa0EDvkX8f/lQqU6vRlj38XjEshuAsiqm6zweU5z8pxGkxURWuZJls0jJBqpg4XFXNh+iEdrrLlGPRlB2P/NqhoMxzL1o2T4ZKdTHQXX146e8Ngmc=----ATTACHMENT:----Njc3NjY0ODUwNjIwNzEwNCA1MzkyMTgzNzE0NDI0ODA2IDYyODc0Mzk0MjE0MDY4Mzk=