PHP Класс FactoryGirl\Provider\Doctrine\FieldDef

Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
future ( )
past ( )
reference ( string $name ) : callable Defines a field to get() a named entity from the factory.
sequence ( callable | string $funcOrString, integer $firstNum = 1 ) : callable Defines a field to be a string based on an incrementing integer.

Описание методов

future() публичный статический Метод

public static future ( )

past() публичный статический Метод

public static past ( )

reference() публичный статический Метод

The normal semantics of get() apply. Normally this means that the field gets a fresh instance of the named entity. If a singleton has been defined, get() will return that.
public static reference ( string $name ) : callable
$name string The name of the entity to get.
Результат callable

sequence() публичный статический Метод

This is typically used to generate unique names such as usernames. The parameter may be a function that receives a counter value each time the entity is created or it may be a string. If the parameter is a string string containing "%d" then it will be replaced by the counter value. If the string does not contain "%d" then the number is simply appended to the parameter.
public static sequence ( callable | string $funcOrString, integer $firstNum = 1 ) : callable
$funcOrString callable | string The function or pattern to generate a value from.
$firstNum integer The first number to use.
Результат callable