/** * @inheritdoc */ public function write(array $param) { $obj = $this->getUniqueInstance(); $obj->data = $param; $this->repo->persist($obj); $this->dump($this->cacheDir, $param); }
protected function initDbWithOnePublishingWithReportedComment() { $author = []; foreach (['kirk', 'spock', 'mccoy'] as $nick) { $author[] = new Author($nick); } $doc = new SmallTalk($author[0]); $comm = new Commentary($author[1]); $comm->report($author[2]); $comm->report($author[0]); $doc->attachCommentary($comm); $this->coll->drop(); $this->repo->persist($doc); }