|
1
|
|
|
<?php |
|
2
|
|
|
|
|
3
|
|
|
namespace App\Jobs\Geneanum\Tunisia; |
|
4
|
|
|
|
|
5
|
|
|
use App\Jobs\Geneanum\Sync; |
|
6
|
|
|
|
|
7
|
|
|
class SyncMarriages extends Sync |
|
8
|
|
|
{ |
|
9
|
|
|
protected const AREA = 'Tunisia'; |
|
10
|
|
|
protected const DATABASE = 'Marriages'; |
|
11
|
|
|
protected const URL = 'https://static.geneanum.com/libs/grid/tunisie_mariage.php?annee_limite=75&_search=false&nd=%s&rows=100&page=%s&sidx=nom_epoux&sord=asc'; |
|
12
|
|
|
|
|
13
|
|
|
/** |
|
14
|
|
|
* @inheritDoc |
|
15
|
|
|
*/ |
|
16
|
|
|
protected function getFields(array $row): array |
|
17
|
|
|
{ |
|
18
|
|
|
[ |
|
19
|
|
|
$photos, |
|
20
|
|
|
$civil_date, |
|
21
|
|
|
$town, |
|
22
|
|
|
$date, |
|
23
|
|
|
$parish, |
|
24
|
|
|
$husband_name, |
|
25
|
|
|
$husband_first_name, |
|
26
|
|
|
$husband_father_first_name, |
|
27
|
|
|
$husband_mother_name, |
|
28
|
|
|
$husband_mother_first_name, |
|
29
|
|
|
$wife_name, |
|
30
|
|
|
$wife_first_name, |
|
31
|
|
|
$wife_father_first_name, |
|
32
|
|
|
$wife_mother_name, |
|
33
|
|
|
$wife_mother_first_name, |
|
34
|
|
|
$index, |
|
35
|
|
|
$observation, |
|
36
|
|
|
] = $row['cell']; |
|
37
|
|
|
|
|
38
|
|
|
return [ |
|
39
|
|
|
'photos' => $photos, |
|
40
|
|
|
'civil_date' => $civil_date, |
|
41
|
|
|
'town' => $town, |
|
42
|
|
|
'date' => $date, |
|
43
|
|
|
'parish' => $parish, |
|
44
|
|
|
'husband_name' => $husband_name, |
|
45
|
|
|
'husband_first_name' => $husband_first_name, |
|
46
|
|
|
'husband_father_first_name' => $husband_father_first_name, |
|
47
|
|
|
'husband_mother_name' => $husband_mother_name, |
|
48
|
|
|
'husband_mother_first_name' => $husband_mother_first_name, |
|
49
|
|
|
'wife_name' => $wife_name, |
|
50
|
|
|
'wife_first_name' => $wife_first_name, |
|
51
|
|
|
'wife_father_first_name' => $wife_father_first_name, |
|
52
|
|
|
'wife_mother_name' => $wife_mother_name, |
|
53
|
|
|
'wife_mother_first_name' => $wife_mother_first_name, |
|
54
|
|
|
'index' => $index, |
|
55
|
|
|
'observation' => $observation, |
|
56
|
|
|
]; |
|
57
|
|
|
} |
|
58
|
|
|
} |
|
59
|
|
|
|