Пример #1
0
 /**
  * @inheritdoc
  */
 public function write(array $param)
 {
     $obj = $this->getUniqueInstance();
     $obj->data = $param;
     $this->repo->persist($obj);
     $this->dump($this->cacheDir, $param);
 }
Пример #2
0
 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);
 }