<?php
 namespace League\OAuth2\Client\Provider; class GenericResourceOwner implements ResourceOwnerInterface { protected $response; protected $resourceOwnerId; public function __construct(array $response, $resourceOwnerId) { $this->response = $response; $this->resourceOwnerId = $resourceOwnerId; } public function getId() { return $this->response[$this->resourceOwnerId]; } public function toArray() { return $this->response; } } 