Author: Nicola Pietroluongo (nik.longstone@gmail.com)
Inheritance: implements Fakerino\Core\Filler\FillerInterface
Example #1
0
 /**
  * Fills the given table with fake data.
  *
  * @param string|null $tableName
  *
  * @return array $rows
  * @throws \Fakerino\FakeData\Exception\MissingRequiredOptionException
  */
 public function fakeTable($tableName = null)
 {
     if ($tableName === null) {
         throw new MissingRequiredOptionException('table name');
     }
     $connectionParams = FakerinoConf::get('database');
     $dbFiller = new DbFiller($connectionParams, $this->db, $tableName, $this, $this->num);
     $rows = $dbFiller->fill();
     return $rows;
 }
Example #2
0
 /**
  * Fills the given table with fake data.
  *
  * @param string|null $tableName
  *
  * @return array $rows
  * @throws \Fakerino\FakeData\Exception\MissingRequiredOptionException
  */
 public function fakeTable($tableName = null)
 {
     if (null === $tableName) {
         throw new MissingRequiredOptionException('table name');
     }
     $dbFiller = new DbFiller($this->db, $tableName, $this, $this->num);
     $rows = $dbFiller->fill();
     return $rows;
 }