PHP Class League\FactoryMuffin\Generators\FactoryGenerator

The factory generator can be useful for setting up relationships between models. The factory generator will return the model id of the model you ask it to generate.
Author: Graham Campbell ([email protected])
Author: Scott Robertson ([email protected])
Author: Michael Bodnarchuk ([email protected])
Inheritance: extends EntityGenerator
Datei anzeigen Open project: zizaco/factory-muff Class Usage Examples

Public Methods

Method Description
generate ( ) : integer | null Generate, and return the attribute.
getPrefix ( ) : string Get the generator prefix.

Private Methods

Method Description
getId ( object $model ) : integer | null Get the model id.

Method Details

generate() public method

The value returned is the id of the generated model, if applicable.
public generate ( ) : integer | null
return integer | null

getPrefix() public static method

Get the generator prefix.
public static getPrefix ( ) : string
return string