/** * @inheritdoc */ protected function setAboutme() { /* @var \PHPHtmlParser\Dom\AbstractNode $postingbody */ $postingbody = self::$dom->find('.postingBody', 0); if (!$postingbody) { throw new ObjectException('Content is empty.'); } $this->aboutme = $postingbody->innerHtml(); parent::setAboutme(); }
/** * @inheritdoc */ protected function setAboutme() { if (self::$dom->find('.removed', 0)) { throw new ObjectException('This posting has been flagged for removal.'); } /* @var \PHPHtmlParser\Dom\AbstractNode $postingbody */ $postingbody = self::$dom->find('#postingbody'); if (!$postingbody) { throw new ObjectException('Content is empty.'); } $this->aboutme = $postingbody->innerHtml(); parent::setAboutme(); }