PHP 클래스 Fakerino\Core\FakeDataFactory

저자: Nicola Pietroluongo ([email protected])
상속: implements Fakerino\Core\FakeDataFactoryInterface
파일 보기 프로젝트 열기: fakerino/fakerino 1 사용 예제들

공개 메소드들

메소드 설명
__construct ( Fakerino\Core\FakeHandler\HandlerInterface $fakeHandler, Fakerino\Core\Database\DbInterface $db, Fakerino\Core\Template\TemplateInterface $template ) It receives: the handlers priority for the fake request, the DbInterface for the fakeTable operation, and the TemplateInterface for the fakeTemplate operation.
__toString ( ) : string
fake ( string | array | null $elementName = null ) : FakeDataFactory Setups the fake element and initializes the output.
fakeEntity ( object | null $entity = null ) : boolean Fills the given entity with fake data.
fakeTable ( string | null $tableName = null ) : array Fills the given table with fake data.
fakeTemplate ( string $file ) : string Fakes a template file.
num ( integer $num = 1 ) : FakeDataFactory Sets $num for iterate the fake process.
seed ( integer | null $seed = null ) : FakeDataFactory
toArray ( ) : array
toJson ( ) : string

비공개 메소드들

메소드 설명
arrayToString ( $arr )
getElementToFake ( $elementsName )
startFake ( $elementName, $num )

메소드 상세

__construct() 공개 메소드

It receives: the handlers priority for the fake request, the DbInterface for the fakeTable operation, and the TemplateInterface for the fakeTemplate operation.
public __construct ( Fakerino\Core\FakeHandler\HandlerInterface $fakeHandler, Fakerino\Core\Database\DbInterface $db, Fakerino\Core\Template\TemplateInterface $template )
$fakeHandler Fakerino\Core\FakeHandler\HandlerInterface
$db Fakerino\Core\Database\DbInterface
$template Fakerino\Core\Template\TemplateInterface

__toString() 공개 메소드

public __toString ( ) : string
리턴 string

fake() 공개 메소드

Setups the fake element and initializes the output.
public fake ( string | array | null $elementName = null ) : FakeDataFactory
$elementName string | array | null
리턴 FakeDataFactory $this

fakeEntity() 공개 메소드

Fills the given entity with fake data.
public fakeEntity ( object | null $entity = null ) : boolean
$entity object | null
리턴 boolean

fakeTable() 공개 메소드

Fills the given table with fake data.
public fakeTable ( string | null $tableName = null ) : array
$tableName string | null
리턴 array $rows

fakeTemplate() 공개 메소드

Fakes a template file.
public fakeTemplate ( string $file ) : string
$file string
리턴 string

num() 공개 메소드

Sets $num for iterate the fake process.
public num ( integer $num = 1 ) : FakeDataFactory
$num integer
리턴 FakeDataFactory $this

seed() 공개 메소드

public seed ( integer | null $seed = null ) : FakeDataFactory
$seed integer | null
리턴 FakeDataFactory $this

toArray() 공개 메소드

public toArray ( ) : array
리턴 array

toJson() 공개 메소드

public toJson ( ) : string
리턴 string json