PHP Class League\FactoryMuffin\Generators\GeneratorFactory

Author: Graham Campbell ([email protected])
Author: Scott Robertson ([email protected])
Author: Michael Bodnarchuk ([email protected])
Datei anzeigen Open project: zizaco/factory-muff Class Usage Examples

Public Methods

Method Description
generate ( string | callable $kind, object $model, FactoryMuffin $factoryMuffin ) : mixed Automatically generate the attribute we want.
make ( string | callable $kind, object $model, FactoryMuffin $factoryMuffin ) : League\FactoryMuffin\Generators\GeneratorInterface | null Automatically make the generator class we need.

Method Details

generate() public method

Automatically generate the attribute we want.
public generate ( string | callable $kind, object $model, FactoryMuffin $factoryMuffin ) : mixed
$kind string | callable The kind of attribute.
$model object The model instance.
$factoryMuffin League\FactoryMuffin\FactoryMuffin The factory muffin instance.
return mixed

make() public method

Automatically make the generator class we need.
public make ( string | callable $kind, object $model, FactoryMuffin $factoryMuffin ) : League\FactoryMuffin\Generators\GeneratorInterface | null
$kind string | callable The kind of attribute.
$model object The model instance.
$factoryMuffin League\FactoryMuffin\FactoryMuffin The factory muffin instance.
return League\FactoryMuffin\Generators\GeneratorInterface | null