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
Afficher le fichier Open project: zizaco/factory-muff Class Usage Examples

Méthodes publiques

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

Private Methods

Méthode Description
getId ( object $model ) : integer | null Get the model id.

Method Details

generate() public méthode

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

getPrefix() public static méthode

Get the generator prefix.
public static getPrefix ( ) : string
Résultat string