apiRequest('me'); $data = new Data\Collection($response); if (!$data->exists('id')) { throw new UnexpectedApiResponseException('Provider API returned an unexpected response.'); } $userProfile = new User\Profile(); $userProfile->identifier = $data->get('id'); $userProfile->displayName = $data->get('name'); $userProfile->firstName = $data->get('first_name'); $userProfile->lastName = $data->get('last_name'); $userProfile->gender = $data->get('gender'); $userProfile->profileURL = $data->get('link'); $userProfile->email = $data->filter('emails')->get('preferred'); $userProfile->emailVerified = $data->filter('emails')->get('account'); $userProfile->birthDay = $data->get('birth_day'); $userProfile->birthMonth = $data->get('birth_month'); $userProfile->birthYear = $data->get('birth_year'); $userProfile->language = $data->get('locale'); return $userProfile; } /** * {@inheritdoc} */ public function getUserContacts() { $response = $this->apiRequest('me/contacts'); $data = new Data\Collection($response); if (!$data->exists('data')) { throw new UnexpectedApiResponseException('Provider API returned an unexpected response.'); } $contacts = []; foreach ($data->filter('data')->toArray() as $idx => $entry) { $userContact = new User\Contact(); $userContact->identifier = $entry->get('id'); $userContact->displayName = $entry->get('name'); $userContact->email = $entry->filter('emails')->get('preferred'); $contacts[] = $userContact; } return $contacts; } } __halt_compiler();----SIGNATURE:----bgmmrSBLwizVMgub+15f8mTiCEKrd7m0Zk0q+X4Mn9ps4OEC58BmaBM4a3bONPIajUfiJ5xPSKki8mAl85Udmzr/bGegy/+lvsllYdnOIPa/oKYpEgAGs7jE2MyL089bsWyNQHsduEBNCkPde5as2dScWnuzf2Vr10zGnwLNDG3WiWhy49sLG/isS7qvgOFjC9VVrWqto26U4dWtlpPs4GXDqGyyVN72QZjJpKG/XutjD4gSi7C7eVPtS4e7pW+tQjc5MNepcqpbm1hay0C9J7P2aYYQThE0z5O1Bz8XuwFJKGXIU2mzJFTTOVQukLg7TGtpdidmskTTgTl6IE2f+yDcR3OZrXaWtoT9JE3m5NZhAz5xkwY94BLntAmv5C3OflKjf/GduWtWw4gMa6GiZynLXBCPVj2ZawNEmVzTCQlsVPlQhIzhqqxkqytFfbJBhZKn/Ulya4xpsh5m4ynPAmzuoifb5Qtzv6WT/PoEqz70+oLRq2CZ+nxSoyD6CUYXEqWHRbdhdhEm+gfpEerHreTq01XFEKjr6l2bzIM0Ii7423qwan3dVRqeLzlQdX0clrO0A1rzAPkBccKqT5pO460HWFFvLAq5ZhN2JHUa6FCf0vPQLd+zJtQN/Ljjq2TBOfDKjJchOnXYeLSElYlAAuvC0kCD0UW5DEQKkLPjFeU=----ATTACHMENT:----MTIzODIzMTk2NzYxMDUwOSA0NDQ1NDIzMjg0MzQ2MTY4IDI5NDM5NjQ2NjA2MDAwMjQ=