/** * 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'); }
public function __construct(IDb $db){ parent::__construct($db); }
public function __construct(IDBConnection $db) { parent::__construct($db); }