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:----EMt7kKB/dszSeFmj86rqMzkwkobBLdSQeOhKUJIXtJ9GTei81GVUv0Ni9uXlHO+Mwqp6vIZHdR+Njs/JREVgJxuwbd0hH7yME7pg/DJO98ML4Jo7FpELu3HJy/ud7cWRI6LYDJ7ikxEjbpIXh8H2yH3GxzJh2UpzvesIUfuebfj+XHcyvHxbX5wkiC37tGF8xCQMaqjts1tW27lMTLOcsDmmGql1qjgJg3lrCCHuUI9XMm1k1dxoL7h/H7+tkaW5q0NtPBn94w48BArHdzCwwfMK/SBTakuA5EEEyFzdKa4BxJnzhYgvU51VzxOxR+p+cZiADuqsbwo1Ijo2q5+D3rRsYlemBdDX7ut3zVfqFhcAQ57PzOsi84LzLG/gVVySjknhAQ7TM7UBOh6QfK1UlBwiXUb5ag+FW4Xys1m73bBFFCmxAy8zDdp1RQ6ZvcxCeMb7zTNDXx7rgJaLpZ1EGeEDIE5YppHrtHQBhDF22++MZ9epVEjWiVas7a+volO4/aiDs5X5I+Ia/Ob4AhWqY5m/dvLitasBwRtaxFO9Hw6o33FsUVqQwfBlXdATfTqinPZMGzHJIWMT06uGo02Ge21C2B+PxKF8MEwL+n3nvXZ/BDGfvD+/8REx4vQF+j6zd0TgF1eiok6CXIb9E0l/Ntbc39TIdmvQXI1kyQxpxhs=----ATTACHMENT:----NjgzMTU4MTM1MDIzNTMzOSA1MjMwNTQyODI0ODUwNjkgNTg3Nzg0NTc3NDczMDE4Mg==