Пример #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
 public function __construct(IDBConnection $db)
 {
     parent::__construct($db);
 }