/** * @param $fromUser * @param $toUser * @param $articles */ public function __construct($fromUser, $toUser, $articles) { parent::__construct($fromUser, $toUser); $count = 0; $articleStr = ""; foreach ($articles as $article) { $count++; $articleStr .= $article->produce(); } $this->replaceParamsPool['articleCount'] = $count; $this->replaceParamsPool['articles'] = $articleStr; }
public function __construct($fromUser, $toUser, $content) { parent::__construct($fromUser, $toUser); $this->replaceParamsPool['content'] = $content; }