1 | <?php |
||
26 | class SaitoDummyDataShell extends Shell |
||
27 | { |
||
28 | public $uses = ['Entry', 'User']; |
||
29 | |||
30 | protected $_Categories = null; |
||
31 | |||
32 | /** @var array */ |
||
33 | protected $_Users; |
||
34 | |||
35 | protected $_text = null; |
||
36 | |||
37 | protected $_Threads = []; |
||
38 | |||
39 | protected $_users = [ |
||
40 | 'Aaron', |
||
41 | 'Alex', |
||
42 | 'Amy', |
||
43 | 'Ana-Lucia', |
||
44 | 'Anthony', |
||
45 | 'Ben', |
||
46 | 'Bernard', |
||
47 | 'Boone', |
||
48 | 'Carmen', |
||
49 | 'Carole', |
||
50 | 'Charles', |
||
51 | 'Charlie', |
||
52 | 'Charlotte', |
||
53 | 'Christian', |
||
54 | 'Claire', |
||
55 | 'Daniel', |
||
56 | 'Danielle', |
||
57 | 'Desmond', |
||
58 | 'Dogen', |
||
59 | 'Eko', |
||
60 | 'Eloise', |
||
61 | 'Ethan', |
||
62 | 'Frank', |
||
63 | 'Frogurt', |
||
64 | 'George', |
||
65 | 'Gina', |
||
66 | 'Horace', |
||
67 | 'Hugo', |
||
68 | 'Ilana', |
||
69 | 'Jack', |
||
70 | 'Jacob', |
||
71 | 'James', |
||
72 | 'Jin', |
||
73 | 'John', |
||
74 | 'Juliet', |
||
75 | 'Kate', |
||
76 | 'Kelvin', |
||
77 | 'Liam', |
||
78 | 'Libby', |
||
79 | 'Martin', |
||
80 | 'Maninbla', |
||
81 | 'Michael', |
||
82 | 'Michelle', |
||
83 | 'Miles', |
||
84 | 'Nadia', |
||
85 | 'Naomi', |
||
86 | 'Nikki', |
||
87 | 'Omar', |
||
88 | 'Paulo', |
||
89 | 'Penny', |
||
90 | 'Pierre', |
||
91 | 'Richard', |
||
92 | 'Sarah', |
||
93 | 'Sayid', |
||
94 | 'Shannon', |
||
95 | 'Stuart', |
||
96 | 'Sun', |
||
97 | 'Teresa', |
||
98 | 'Tom', |
||
99 | 'Walt' |
||
100 | ]; |
||
101 | |||
102 | /** |
||
103 | * {@inheritDoc} |
||
104 | */ |
||
105 | public function initialize() |
||
112 | |||
113 | /** |
||
114 | * {@inheritDoc} |
||
115 | */ |
||
116 | public function main() |
||
121 | |||
122 | /** |
||
123 | * Generate postings |
||
124 | * |
||
125 | * @return void |
||
126 | */ |
||
127 | public function generatePostings() |
||
172 | |||
173 | /** |
||
174 | * generate users |
||
175 | * |
||
176 | * @return void |
||
177 | */ |
||
178 | public function generateUsers() |
||
209 | |||
210 | /** |
||
211 | * Update progress |
||
212 | * |
||
213 | * @param int $i current |
||
214 | * @param int $off 100% |
||
215 | * @return void |
||
216 | */ |
||
217 | protected function _progress($i, $off) |
||
228 | |||
229 | /** |
||
230 | * Return random category |
||
231 | * |
||
232 | * @return int category_id |
||
233 | */ |
||
234 | protected function _randomCategory() |
||
246 | |||
247 | /** |
||
248 | * Return random user |
||
249 | * |
||
250 | * @return CurrentUserInterface a user |
||
251 | */ |
||
252 | protected function _randomUser() |
||
267 | |||
268 | /** |
||
269 | * Return random text |
||
270 | * |
||
271 | * @return string text |
||
272 | */ |
||
273 | protected function _randomText() |
||
283 | } |
||
284 |