예제 #1
0
 /**
  * Saves a fixture in a database and returns the saved result
  * @param Entity $fixture
  * @return int the id
  */
 protected function loadFixture(Entity $fixture)
 {
     if ($fixture instanceof FeedFixture) {
         return $this->feedMapper->insert($fixture)->getId();
     } elseif ($fixture instanceof ItemFixture) {
         return $this->itemMapper->insert($fixture)->getId();
     } elseif ($fixture instanceof FolderFixture) {
         return $this->folderMapper->insert($fixture)->getId();
     }
     throw new \InvalidArgumentException('Invalid fixture class given');
 }
예제 #2
0
 public function __construct(IDb $db){
     parent::__construct($db);
 }
예제 #3
0
파일: itemmapper.php 프로젝트: cs-team/news
 public function __construct(IDBConnection $db)
 {
     parent::__construct($db);
 }