package GlotPress
inherited_from \GP_UnitTest_Factory_For_Thing

 Methods

Creates a new factory, which will create objects of a specific Thing

__construct(object $factory = null, object $thing = null
inherited_from \GP_UnitTest_Factory_For_Thing::__construct()

Parameters

$factory

$thing

Creates a new factory, which will create objects of a specific Thing

__construct(object $factory, object $thing, array $default_generation_definitions = array()
Inherited

Parameters

$factory

object

GLobal factory that can be used to create other objects on the system

$thing

object

Instance of a GP_Thing subclass. This factory will create objects of this type

$default_generation_definitions

array

Defines what default values should the properties of the object have. The default values can be generators -- an object with next() method. There are some default generators: {@link GP_UnitTest_Generator_Sequence}, {@link GP_UnitTest_Generator_Locale_Name}, {@link GP_UnitTest_Factory_Callback_After_Create}.

apply_callbacks()

apply_callbacks($callbacks, $created) 
Inherited

Parameters

$callbacks

$created

callback()

callback($function) 
InheritedStatic

Parameters

$function

create()

create($args = array(), $generation_definitions = null
Inherited

Parameters

$args

$generation_definitions

create_with_project()

create_with_project($args = array(), $project_args = array()

Parameters

$args

$project_args

create_with_project_and_locale()

create_with_project_and_locale($args = array(), $project_args = array()

Parameters

$args

$project_args

generate_args()

generate_args($args = array(), $generation_definitions = null, $callbacks = null
Inherited

Parameters

$args

$generation_definitions

$callbacks

 Properties

 

$default_generation_definitions

$default_generation_definitions 

Default

 

$factory

$factory 

Default

 

$thing

$thing 

Default