/
bootstrap.php
123 lines (103 loc) · 3.88 KB
/
bootstrap.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
<?php
/*
|--------------------------------------------------------------------------
| Extension Bootstrap
|--------------------------------------------------------------------------
|
| To use extension, please register each class with their individual factories
| examples are show below:
|
| Override Built-in Platform
|
|
*/
use Faker\PlatformFactory;
use Faker\ColumnTypeFactory;
use Faker\Components\Faker\Formatter\FormatterFactory;
use Faker\Components\Engine\Common\TypeRepository;
use Faker\Locale\LocaleFactory;
/*
|--------------------------------------------------------------------------
| Doctrine Platforms
|--------------------------------------------------------------------------
|
| To include new platforms must tell Faker\\PlatformFactory what the new or overriden
| extensions are.
|
|
| Override Built-in Platform (mysql):
|
| PlatformFactory::registerExtension('mysql','Faker\\Components\\Extension\\Doctrine\\Platforms\\MySqlPlatform');
|
| Include New MyPlatform:
|
| PlatformFactory::registerExtension('myplatform','Faker\\Components\\Extension\\Doctrine\\Platforms\\MyPlatform');
|
*/
PlatformFactory::registerExtension('mysql','Faker\\Extension\\Doctrine\\Platforms\\MySqlPlatform');
/*
|--------------------------------------------------------------------------
| Doctrine Column Types
|--------------------------------------------------------------------------
|
| To include new column types use the Faker\\ColumnTypeFactory
|
|
| Add new Column types (mysql):
|
| ColumnTypeFactory::registerExtension('cus_array','Faker\\Components\\Extension\\Doctrine\\Type\\ArrayType');
|
| To use new column types you will need to also create a platform extension, and add the key used above to the initializeDoctrineTypeMappings()
*/
//ColumnTypeFactory::registerExtension('cus_array','Faker\\Components\\Extension\\Doctrine\\Type\\ArrayType');
/*
|--------------------------------------------------------------------------
| Faker DataTypes
|--------------------------------------------------------------------------
|
| To Add a new datatype a it must be registered, and the object
| are extending from base Type.
|
| You may also override built in types using the same key.
|
| Example:
|
| TypeRepository::registerExtension('vector','Faker\\Extension\\Faker\\Type\\Vector');
*/
TypeRepository::registerExtension('job_id','Faker\\Extension\\Faker\\Type\\Job');
TypeRepository::registerExtension('worker','Faker\\Extension\\Faker\\Type\\Worker');
TypeRepository::registerExtension('job_data','Faker\\Extension\\Faker\\Type\\Data');
/*
|--------------------------------------------------------------------------
| Faker Formatters
|--------------------------------------------------------------------------
|
| Register a new formatter, which control how data is written to the writter.
|
| FormatterFactory::registerExtension('mongo','Faker\\Components\\Extension\\Faker\\Formatter\\Mongo');
|
*/
//FormatterFactory::registerExtension('mongo','Faker\\Components\\Extension\\Faker\\Formatter\\Mongo');
/*
|--------------------------------------------------------------------------
| Faker Locales
|--------------------------------------------------------------------------
|
| Register a new Locale, which provide locale specific text to the generators.
|
| LocaleFactory::registerExtension('french','Faker\\Components\\Extension\\Locale\\FrenchLocale');
|
*/
//LocaleFactory::registerExtension('french','Faker\\Components\\Extension\\Locale\\FrenchLocale');
/*
|--------------------------------------------------------------------------
| Load Later Job UUID CLASS
|--------------------------------------------------------------------------
|
| Needed for extension types
|
*/
require_once(__DIR__.'/../../src/LaterJob/UUID.php');
require_once(__DIR__.'/../../src/LaterJob/Util/GeneratorInterface.php');
require_once(__DIR__.'/../../src/LaterJob/Util/MersenneRandom.php');
/* End of File */