PHP 클래스 FactoryGirl\Provider\Doctrine\FieldDef

파일 보기 프로젝트 열기: breerly/factory-girl-php 1 사용 예제들

공개 메소드들

메소드 설명
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