PHP Class League\FactoryMuffin\Generators\EntityGenerator
The entity generator can be useful for setting up relationships between
models. The entity generator will create and return the generated model.
显示文件
Open project: zizaco/factory-muff
Class Usage Examples
Public Methods
Private Methods
Method Details
__construct()
public method
Create a new factory generator instance.
public __construct ( string $kind, object $model, FactoryMuffin $factoryMuffin ) : void |
$kind |
string |
The kind of attribute. |
$model |
object |
The model instance. |
$factoryMuffin |
League\FactoryMuffin\FactoryMuffin |
The factory muffin instance. |
return |
void |
|
The value returned is the id of the generated model, if applicable.
getPrefix()
public static method
Get the generator prefix.