PHP Interface Fakerino\Core\FakeDataFactoryInterface

Author: Nicola Pietroluongo ([email protected])
Datei anzeigen Open project: fakerino/fakerino

Public Methods

Method Description
__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

Method Details

__toString() public method

public __toString ( ) : string
return string

fake() public method

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

fakeEntity() public method

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

fakeTable() public method

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

fakeTemplate() public method

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

num() public method

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

seed() public method

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

toArray() public method

public toArray ( ) : array
return array

toJson() public method

public toJson ( ) : string
return string json