for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php namespace League\OAuth2\Client\Provider;
use League\OAuth2\Client\Tool\ArrayAccessorTrait;
/**
* @property array $response
* @property string $uid
*/
class LinkedInResourceOwner extends GenericResourceOwner
{
use ArrayAccessorTrait;
* Raw response
*
* @var array
protected $response;
* Creates new resource owner.
* @param array $response
public function __construct(array $response = array())
$this->response = $response;
}
* Gets resource owner attribute by key. The key supports dot notation.
* @return mixed
public function getAttribute($key)
return $this->getValueByKey($this->response, (string) $key);
* Get user email
* @return string|null
public function getEmail()
return $this->getAttribute('emailAddress');
* Get user firstname
public function getFirstName()
return $this->getAttribute('firstName');
* Get user imageurl
public function getImageurl()
return $this->getAttribute('pictureUrl');
* Get user lastname
public function getLastName()
return $this->getAttribute('lastName');
* Get user userId
public function getId()
return $this->getAttribute('id');
* Get user location
public function getLocation()
return $this->getAttribute('location.name');
* Get user description
public function getDescription()
return $this->getAttribute('headline');
* Get user url
public function getUrl()
return $this->getAttribute('publicProfileUrl');
* Return all of the owner details available as an array.
* @return array
public function toArray()
return $this->response;