fill() public method

Fills the tablename with fake value.
public fill ( ) : array
return array
コード例 #1
0
ファイル: FakeDataFactory.php プロジェクト: jmolivas/Fakerino
 /**
  * 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;
 }
コード例 #2
0
ファイル: FakeDataFactory.php プロジェクト: fakerino/fakerino
 /**
  * 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;
 }