/** * Inserts records in the database * * This will only happen if the underlying table is modified in any way or * does not exist with a hash yet. * * @param ConnectionInterface $db * @return boolean */ public function insert(ConnectionInterface $db) { if ($this->_tableUnmodified($db)) { return true; } $result = parent::insert($db); static::$_tableHashes[$this->table] = $this->_hash($db); return $result; }
/** * {@inheritdoc} */ public function insert(Connection $db) { if (!parent::insert($db)) { return false; } $entityPopulator = new EntityPopulator($this->table); $populator = new Populator($this->faker); array_walk($this->guessers, array($populator, 'addGuesser')); $populator->addEntity($entityPopulator, $this->number, $this->customColumnFormatters, $this->customModifiers); $populator->execute(['validate' => false]); return true; }