for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php namespace Stevenmaguire\OAuth2\Client\Provider;
use League\OAuth2\Client\Provider\ResourceOwnerInterface;
class ElanceResourceOwner implements ResourceOwnerInterface
{
/**
* Raw response
*
* @var array
*/
protected $response;
* Creates new resource owner.
* @param array $response
public function __construct(array $response = array())
$this->response = $response;
}
* Get resource owner avatar url
* @return string|null
public function getAvatarUrl()
return $this->response['data']['providerProfile']['logo'] ?: null;
* Get resource owner id
public function getId()
return $this->response['data']['providerProfile']['userId'] ?: null;
public function getUsername()
return $this->response['data']['providerProfile']['userName'] ?: null;
* Return all of the owner details available as an array.
* @return array
public function toArray()
return $this->response;