Esempio n. 1
0
 /**
  * @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();
 }
Esempio n. 2
0
 /**
  * @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();
 }
Esempio n. 3
0
 /**
  * Save imported profiles links.
  *
  * @param \app\models\glabs\objects\chatapp\BaseObject $object Object.
  *
  * @return bool
  *
  * @throws InvalidParamException
  */
 public static function saveUsersLinks($object)
 {
     $fp = fopen(Yii::getAlias('@runtime/profiles_' . (int) self::$startTime . '.csv'), 'a');
     fputcsv($fp, [$object->getUrl(), $object->getUploadedLink()]);
     fclose($fp);
     return true;
 }