1
|
|
|
<?php |
2
|
|
|
/** |
3
|
|
|
* Serviço referente a linha no banco de dados |
4
|
|
|
*/ |
5
|
|
|
|
6
|
|
|
namespace Finder\Services\Finders; |
7
|
|
|
|
8
|
|
|
use Illuminate\Support\Collection; |
9
|
|
|
use Telefonica\Models\Actors\Person; |
10
|
|
|
|
11
|
|
|
/** |
12
|
|
|
* |
13
|
|
|
*/ |
14
|
|
|
class PersonService extends FinderAbstractService |
15
|
|
|
{ |
16
|
|
|
protected $config; |
17
|
|
|
|
18
|
|
|
protected $personEntity = false; |
19
|
|
|
|
20
|
|
|
public function __construct($config = false) |
|
|
|
|
21
|
|
|
{ |
22
|
|
|
// if (!$this->config = $config) { |
23
|
|
|
// $this->config = \Illuminate\Support\Facades\Config::get('sitec.sitec.models'); |
24
|
|
|
// } |
25
|
|
|
} |
26
|
|
|
|
27
|
|
View Code Duplication |
public function aboutBody($config = false) |
|
|
|
|
28
|
|
|
{ |
29
|
|
|
return $this->mergeWith( |
30
|
|
|
$this->getPerson()->pircings()->get(), |
|
|
|
|
31
|
|
|
$this->getPerson()->pintinhas()->get(), |
|
|
|
|
32
|
|
|
$this->getPerson()->tatuages()->get() |
|
|
|
|
33
|
|
|
); |
34
|
|
|
} |
35
|
|
|
|
36
|
|
View Code Duplication |
public function aboutLikes($config = false) |
|
|
|
|
37
|
|
|
{ |
38
|
|
|
return $this->mergeWith( |
39
|
|
|
$this->getPerson()->pircings()->get(), |
|
|
|
|
40
|
|
|
$this->getPerson()->pintinhas()->get(), |
|
|
|
|
41
|
|
|
$this->getPerson()->tatuages()->get() |
|
|
|
|
42
|
|
|
); |
43
|
|
|
} |
44
|
|
|
|
45
|
|
|
|
46
|
|
|
public function aboutPersonagens($config = false) |
|
|
|
|
47
|
|
|
{ |
48
|
|
|
return $this->mergeWith( |
49
|
|
|
$this->getPerson()->productions()->get(), |
|
|
|
|
50
|
|
|
$this->getPerson()->personagens()->get() |
|
|
|
|
51
|
|
|
); |
52
|
|
|
} |
53
|
|
|
|
54
|
|
|
|
55
|
|
|
/** |
56
|
|
|
* Localizar |
57
|
|
|
*/ |
58
|
|
|
public function aboutLocals($config = false) |
|
|
|
|
59
|
|
|
{ |
60
|
|
|
return $this->mergeWith( |
61
|
|
|
$this->getPerson()->accounts()->get(), |
|
|
|
|
62
|
|
|
$this->getPerson()->phones()->get(), |
|
|
|
|
63
|
|
|
$this->getPerson()->emails()->get(), |
|
|
|
|
64
|
|
|
$this->getPerson()->addresses()->get(), |
|
|
|
|
65
|
|
|
$this->getPerson()->sitios()->get() |
|
|
|
|
66
|
|
|
); |
67
|
|
|
} |
68
|
|
|
|
69
|
|
|
/** |
70
|
|
|
* ORganizacao |
71
|
|
|
*/ |
72
|
|
|
|
73
|
|
|
public function aboutSenhas($config = false) |
|
|
|
|
74
|
|
|
{ |
75
|
|
|
return $this->mergeWith( |
76
|
|
|
$this->getPerson()->passwords()->get() |
|
|
|
|
77
|
|
|
); |
78
|
|
|
} |
79
|
|
|
|
80
|
|
|
public function aboutInfo($config = false) |
|
|
|
|
81
|
|
|
{ |
82
|
|
|
return $this->mergeWith( |
83
|
|
|
$this->getPerson()->infos()->get(), |
|
|
|
|
84
|
|
|
$this->getPerson()->fatos()->get() |
|
|
|
|
85
|
|
|
); |
86
|
|
|
} |
87
|
|
|
public function aboutMidias($config = false) |
|
|
|
|
88
|
|
|
{ |
89
|
|
|
return $this->mergeWith( |
90
|
|
|
$this->getPerson()->videos()->get(), |
|
|
|
|
91
|
|
|
$this->getPerson()->imagens()->get() |
|
|
|
|
92
|
|
|
); |
93
|
|
|
} |
94
|
|
|
} |
95
|
|
|
|
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.