| @@ 51-66 (lines=16) @@ | ||
| 48 | /** |
|
| 49 | * @return string |
|
| 50 | */ |
|
| 51 | public function getEmail() |
|
| 52 | {
|
|
| 53 | if( !empty($this->getData()->email) ) |
|
| 54 | return $this->getData()->email; |
|
| 55 | ||
| 56 | if( isset($this->getData()->socials) ) |
|
| 57 | {
|
|
| 58 | foreach($this->getData()->socials as $social) |
|
| 59 | {
|
|
| 60 | if( !empty($social->email) ) |
|
| 61 | return $social->email; |
|
| 62 | } |
|
| 63 | } |
|
| 64 | ||
| 65 | return ''; |
|
| 66 | } |
|
| 67 | ||
| 68 | /** |
|
| 69 | * @return string |
|
| @@ 71-86 (lines=16) @@ | ||
| 68 | /** |
|
| 69 | * @return string |
|
| 70 | */ |
|
| 71 | public function getName() |
|
| 72 | {
|
|
| 73 | if( !empty($this->getProfile()->name) ) |
|
| 74 | return $this->getProfile()->name; |
|
| 75 | ||
| 76 | if( isset($this->getData()->socials) ) |
|
| 77 | {
|
|
| 78 | foreach($this->getData()->socials as $social) |
|
| 79 | {
|
|
| 80 | if( !empty($social->name) ) |
|
| 81 | return $social->name; |
|
| 82 | } |
|
| 83 | } |
|
| 84 | ||
| 85 | return ''; |
|
| 86 | } |
|
| 87 | } |
|