yii\test\BaseActiveFixture::load PHP Method

load() public method

The default implementation simply stores the data returned by BaseActiveFixture::getData in [[data]]. You should usually override this method by putting the data into the underlying database.
public load ( )
    public function load()
    {
        $this->data = $this->getData();
    }

Usage Example

コード例 #1
0
ファイル: ActiveFixture.php プロジェクト: sciurodont/yii2
 /**
  * Loads the fixture data.
  * Data will be batch inserted into the given collection.
  */
 public function load()
 {
     parent::load();
     $data = $this->getData();
     $this->getCollection()->batchInsert($data);
     foreach ($data as $alias => $row) {
         $this->data[$alias] = $row;
     }
 }
All Usage Examples Of yii\test\BaseActiveFixture::load