PHP 클래스 yii\test\ArrayFixture

For more details and usage information on ArrayFixture, see the guide article on fixtures.
부터: 2.0
저자: Mark Jebri ([email protected])
상속: extends Fixture, implements IteratorAggregate, implements ArrayAccess, implements Countable, use trait yii\base\ArrayAccessTrait
파일 보기 프로젝트 열기: yiisoft/yii2 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
$data the data rows. Each array element represents one row of data (column name => column value).
$dataFile the file path or path alias of the data file that contains the fixture data to be returned by ArrayFixture::getData. You can set this property to be false to prevent loading any data.

공개 메소드들

메소드 설명
load ( ) Loads the fixture.
unload ( )

보호된 메소드들

메소드 설명
getData ( ) : array Returns the fixture data.

메소드 상세

getData() 보호된 메소드

The default implementation will try to return the fixture data by including the external file specified by [[dataFile]]. The file should return the data array that will be stored in [[data]] after inserting into the database.
protected getData ( ) : array
리턴 array the data to be put into the database

load() 공개 메소드

The default implementation simply stores the data returned by ArrayFixture::getData in [[data]]. You should usually override this method by putting the data into the underlying database.
public load ( )

unload() 공개 메소드

public unload ( )

프로퍼티 상세

$data 공개적으로 프로퍼티

the data rows. Each array element represents one row of data (column name => column value).
public $data

$dataFile 공개적으로 프로퍼티

the file path or path alias of the data file that contains the fixture data to be returned by ArrayFixture::getData. You can set this property to be false to prevent loading any data.
public $dataFile